java.lang.Object
com.sap.cloud.sdk.datamodel.odatav4.core.VdmObject<EntityT>
com.sap.cloud.sdk.datamodel.odatav4.core.VdmEntity<ServiceCancellationReason>
com.sap.cloud.sdk.s4hana.datamodel.odatav4.namespaces.servicecancellationreason.ServiceCancellationReason
All Implemented Interfaces:
VdmEntitySet

public class ServiceCancellationReason extends VdmEntity<ServiceCancellationReason> implements VdmEntitySet
Service Cancellation Reason

Original entity name from the Odata EDM: ServiceCancellationReason_Type

  • Field Details

  • Constructor Details

    • ServiceCancellationReason

      public ServiceCancellationReason()
    • ServiceCancellationReason

      public ServiceCancellationReason(@Nullable String serviceContrCancellationReason, @Nullable String serviceContrCanclnReasonName, List<SrvcCancellationReasonText> to_SrvcCancellationReasonText)
  • Method Details

    • getType

      @Nonnull public Class<ServiceCancellationReason> getType()
      Specified by:
      getType in class VdmObject<ServiceCancellationReason>
    • setServiceContrCancellationReason

      public void setServiceContrCancellationReason(@Nullable String serviceContrCancellationReason)
      (Key Field) Constraints: Not nullable, Maximum length: 4

      Original property name from the Odata EDM: ServiceContrCancellationReason

      Parameters:
      serviceContrCancellationReason - CRM Service : Reason for Cancellation
    • setServiceContrCanclnReasonName

      public void setServiceContrCanclnReasonName(@Nullable String serviceContrCanclnReasonName)
      Constraints: Not nullable, Maximum length: 40

      Original property name from the Odata EDM: ServiceContrCanclnReasonName

      Parameters:
      serviceContrCanclnReasonName - Description (40 Characters)
    • getEntityCollection

      protected String getEntityCollection()
      Specified by:
      getEntityCollection in class VdmEntity<ServiceCancellationReason>
    • getKey

      @Nonnull protected ODataEntityKey getKey()
      Overrides:
      getKey in class VdmObject<ServiceCancellationReason>
    • toMapOfFields

      @Nonnull protected Map<String,Object> toMapOfFields()
      Overrides:
      toMapOfFields in class VdmObject<ServiceCancellationReason>
    • fromMap

      protected void fromMap(Map<String,Object> inputValues)
      Overrides:
      fromMap in class VdmObject<ServiceCancellationReason>
    • getDefaultServicePath

      protected String getDefaultServicePath()
      Overrides:
      getDefaultServicePath in class VdmEntity<ServiceCancellationReason>
    • toMapOfNavigationProperties

      @Nonnull protected Map<String,Object> toMapOfNavigationProperties()
      Overrides:
      toMapOfNavigationProperties in class VdmObject<ServiceCancellationReason>
    • getSrvcCancellationReasonTextIfPresent

      @Nonnull public io.vavr.control.Option<List<SrvcCancellationReasonText>> getSrvcCancellationReasonTextIfPresent()
      Retrieval of associated SrvcCancellationReasonText entities (one to many). This corresponds to the OData navigation property _SrvcCancellationReasonText.

      If the navigation property for an entity ServiceCancellationReason has not been resolved yet, this method will not query further information. Instead its Option result state will be empty.

      Returns:
      If the information for navigation property _SrvcCancellationReasonText is already loaded, the result will contain the SrvcCancellationReasonText entities. If not, an Option with result state empty is returned.
    • setSrvcCancellationReasonText

      public void setSrvcCancellationReasonText(@Nonnull List<SrvcCancellationReasonText> value)
      Overwrites the list of associated SrvcCancellationReasonText entities for the loaded navigation property _SrvcCancellationReasonText.

      If the navigation property _SrvcCancellationReasonText of a queried ServiceCancellationReason is operated lazily, an ODataException can be thrown in case of an OData query error.

      Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations.

      Parameters:
      value - List of SrvcCancellationReasonText entities.
    • addSrvcCancellationReasonText

      public void addSrvcCancellationReasonText(SrvcCancellationReasonText... entity)
      Adds elements to the list of associated SrvcCancellationReasonText entities. This corresponds to the OData navigation property _SrvcCancellationReasonText.

      If the navigation property _SrvcCancellationReasonText of a queried ServiceCancellationReason is operated lazily, an ODataException can be thrown in case of an OData query error.

      Please note: Lazy loading of OData entity associations is the process of asynchronous retrieval and persisting of items from a navigation property. If a lazy property is requested by the application for the first time and it has not yet been loaded, an OData query will be run in order to load the missing information and its result will get cached for future invocations.

      Parameters:
      entity - Array of SrvcCancellationReasonText entities.
    • builder

    • getServiceContrCancellationReason

      @Nullable public String getServiceContrCancellationReason()
      (Key Field) Constraints: Not nullable, Maximum length: 4

      Original property name from the Odata EDM: ServiceContrCancellationReason

      Returns:
      CRM Service : Reason for Cancellation
    • getServiceContrCanclnReasonName

      @Nullable public String getServiceContrCanclnReasonName()
      Constraints: Not nullable, Maximum length: 40

      Original property name from the Odata EDM: ServiceContrCanclnReasonName

      Returns:
      Description (40 Characters)
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class VdmObject<ServiceCancellationReason>
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class VdmEntity<ServiceCancellationReason>
    • canEqual

      protected boolean canEqual(@Nullable Object other)
      Overrides:
      canEqual in class VdmEntity<ServiceCancellationReason>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class VdmEntity<ServiceCancellationReason>
    • getOdataType

      public String getOdataType()
      Specified by:
      getOdataType in class VdmObject<ServiceCancellationReason>