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

public class ProductGroup extends VdmEntity<ProductGroup> implements VdmEntitySet
Product Group

Original entity name from the Odata EDM: ProductGroupType

  • Field Details

  • Constructor Details

    • ProductGroup

      public ProductGroup()
    • ProductGroup

      public ProductGroup(@Nullable String productGroup, @Nullable String productGroupName, List<ProductGroupText> to_Text)
  • Method Details

    • getType

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

      public void setProductGroup(@Nullable String productGroup)
      (Key Field) Constraints: Not nullable, Maximum length: 9

      Original property name from the Odata EDM: ProductGroup

      Parameters:
      productGroup - Product Group
    • setProductGroupName

      public void setProductGroupName(@Nullable String productGroupName)
      Constraints: Not nullable, Maximum length: 20

      Original property name from the Odata EDM: ProductGroupName

      Parameters:
      productGroupName - Product Group Description
    • getEntityCollection

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

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

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

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

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

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

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

      If the navigation property for an entity ProductGroup 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 ProductGroupText entities. If not, an Option with result state empty is returned.
    • setText

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

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

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

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

      @Nonnull public static ProductGroup.ProductGroupBuilder builder()
    • getProductGroup

      @Nullable public String getProductGroup()
      (Key Field) Constraints: Not nullable, Maximum length: 9

      Original property name from the Odata EDM: ProductGroup

      Returns:
      Product Group
    • getProductGroupName

      @Nullable public String getProductGroupName()
      Constraints: Not nullable, Maximum length: 20

      Original property name from the Odata EDM: ProductGroupName

      Returns:
      Product Group Description
    • toString

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

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

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

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

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