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

public class ProductType extends VdmEntity<ProductType> implements VdmEntitySet
Product Type

Original entity name from the Odata EDM: ProductTypeType

  • Field Details

  • Constructor Details

    • ProductType

      public ProductType()
    • ProductType

      public ProductType(@Nullable String productType, @Nullable String productTypeName, List<ProductTypeText> to_Text)
  • Method Details

    • getType

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

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

      Original property name from the Odata EDM: ProductType

      Parameters:
      productType - Product Type
    • setProductTypeName

      public void setProductTypeName(@Nullable String productTypeName)
      Constraints: Not nullable, Maximum length: 25

      Original property name from the Odata EDM: ProductTypeName

      Parameters:
      productTypeName - Description of product type
    • getEntityCollection

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

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

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

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

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

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

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

      If the navigation property for an entity ProductType 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 _Text is already loaded, the result will contain the ProductTypeText entities. If not, an Option with result state empty is returned.
    • setText

      public void setText(@Nonnull List<ProductTypeText> value)
      Overwrites the list of associated ProductTypeText entities for the loaded navigation property _Text.

      If the navigation property _Text of a queried ProductType 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 ProductTypeText entities.
    • addText

      public void addText(ProductTypeText... entity)
      Adds elements to the list of associated ProductTypeText entities. This corresponds to the OData navigation property _Text.

      If the navigation property _Text of a queried ProductType 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 ProductTypeText entities.
    • builder

      @Nonnull public static ProductType.ProductTypeBuilder builder()
    • getProductType

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

      Original property name from the Odata EDM: ProductType

      Returns:
      Product Type
    • getProductTypeName

      @Nullable public String getProductTypeName()
      Constraints: Not nullable, Maximum length: 25

      Original property name from the Odata EDM: ProductTypeName

      Returns:
      Description of product type
    • toString

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

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

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

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

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