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

public class PurchaseReqn extends VdmEntity<PurchaseReqn> implements VdmEntitySet
Purchase Requisition

Original entity name from the Odata EDM: PurchaseReqnType

  • Field Details

  • Constructor Details

    • PurchaseReqn

      public PurchaseReqn()
    • PurchaseReqn

      public PurchaseReqn(@Nullable String purchaseRequisition, @Nullable String purchaseRequisitionType, @Nullable String purReqnDescription, @Nullable Boolean sourceDetermination, @Nullable Boolean purReqnDoOnlyValidation, @Nullable Collection<SAP__Message> _Messages, List<PurchaseReqnItem> to_PurchaseRequisitionItem)
  • Method Details

    • getType

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

      public void setPurchaseRequisition(@Nullable String purchaseRequisition)
      (Key Field) Constraints: Not nullable, Maximum length: 10

      Original property name from the Odata EDM: PurchaseRequisition

      Parameters:
      purchaseRequisition - Purchase Requisition Number
    • setPurchaseRequisitionType

      public void setPurchaseRequisitionType(@Nullable String purchaseRequisitionType)
      Constraints: Not nullable, Maximum length: 4

      Original property name from the Odata EDM: PurchaseRequisitionType

      Parameters:
      purchaseRequisitionType - Purchase Requisition Document Type
    • setPurReqnDescription

      public void setPurReqnDescription(@Nullable String purReqnDescription)
      Constraints: Not nullable, Maximum length: 40

      Original property name from the Odata EDM: PurReqnDescription

      Parameters:
      purReqnDescription - Purchase Requisition Description
    • setSourceDetermination

      public void setSourceDetermination(@Nullable Boolean sourceDetermination)
      Constraints: Not nullable

      Original property name from the Odata EDM: SourceDetermination

      Parameters:
      sourceDetermination - Checkbox
    • setPurReqnDoOnlyValidation

      public void setPurReqnDoOnlyValidation(@Nullable Boolean purReqnDoOnlyValidation)
      Constraints: Not nullable

      Original property name from the Odata EDM: PurReqnDoOnlyValidation

      Parameters:
      purReqnDoOnlyValidation - Boolean Variable (X = True, - = False, Space = Unknown)
    • set_Messages

      public void set_Messages(@Nullable Collection<SAP__Message> _Messages)
      Constraints: Not nullable

      Original property name from the Odata EDM: SAP__Messages

      Parameters:
      _Messages - The _Messages to set.
    • getEntityCollection

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

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

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

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

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

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

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

      If the navigation property for an entity PurchaseReqn 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 _PurchaseRequisitionItem is already loaded, the result will contain the PurchaseReqnItem entities. If not, an Option with result state empty is returned.
    • setPurchaseRequisitionItem

      public void setPurchaseRequisitionItem(@Nonnull List<PurchaseReqnItem> value)
      Overwrites the list of associated PurchaseReqnItem entities for the loaded navigation property _PurchaseRequisitionItem.

      If the navigation property _PurchaseRequisitionItem of a queried PurchaseReqn 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 PurchaseReqnItem entities.
    • addPurchaseRequisitionItem

      public void addPurchaseRequisitionItem(PurchaseReqnItem... entity)
      Adds elements to the list of associated PurchaseReqnItem entities. This corresponds to the OData navigation property _PurchaseRequisitionItem.

      If the navigation property _PurchaseRequisitionItem of a queried PurchaseReqn 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 PurchaseReqnItem entities.
    • validate

      @Nonnull public static BoundAction.SingleToSingle<PurchaseReqn,Void> validate()
      Action that can be applied to any entity object of this class.

      Returns:
      Action object prepared with the given parameters to be applied to any entity object of this class.

      To execute it use the service.forEntity(entity).applyAction(thisAction) API.
    • enablePurReqForPurchasing

      @Nonnull public static BoundAction.SingleToSingle<PurchaseReqn,Void> enablePurReqForPurchasing()
      Action that can be applied to any entity object of this class.

      Returns:
      Action object prepared with the given parameters to be applied to any entity object of this class.

      To execute it use the service.forEntity(entity).applyAction(thisAction) API.
    • discardPurReqFromPurchasing

      @Nonnull public static BoundAction.SingleToSingle<PurchaseReqn,Void> discardPurReqFromPurchasing()
      Action that can be applied to any entity object of this class.

      Returns:
      Action object prepared with the given parameters to be applied to any entity object of this class.

      To execute it use the service.forEntity(entity).applyAction(thisAction) API.
    • builder

      @Nonnull public static PurchaseReqn.PurchaseReqnBuilder builder()
    • getPurchaseRequisition

      @Nullable public String getPurchaseRequisition()
      (Key Field) Constraints: Not nullable, Maximum length: 10

      Original property name from the Odata EDM: PurchaseRequisition

      Returns:
      Purchase Requisition Number
    • getPurchaseRequisitionType

      @Nullable public String getPurchaseRequisitionType()
      Constraints: Not nullable, Maximum length: 4

      Original property name from the Odata EDM: PurchaseRequisitionType

      Returns:
      Purchase Requisition Document Type
    • getPurReqnDescription

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

      Original property name from the Odata EDM: PurReqnDescription

      Returns:
      Purchase Requisition Description
    • getSourceDetermination

      @Nullable public Boolean getSourceDetermination()
      Constraints: Not nullable

      Original property name from the Odata EDM: SourceDetermination

      Returns:
      Checkbox
    • getPurReqnDoOnlyValidation

      @Nullable public Boolean getPurReqnDoOnlyValidation()
      Constraints: Not nullable

      Original property name from the Odata EDM: PurReqnDoOnlyValidation

      Returns:
      Boolean Variable (X = True, - = False, Space = Unknown)
    • get_Messages

      @Nullable public Collection<SAP__Message> get_Messages()
      Constraints: Not nullable

      Original property name from the Odata EDM: SAP__Messages

      Returns:
      The _Messages contained in this VdmEntity.
    • toString

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

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

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

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

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