java.lang.Object
com.sap.cloud.sdk.datamodel.odata.helper.VdmObject<EntityT>
com.sap.cloud.sdk.datamodel.odata.helper.VdmEntity<CostCenter>
com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.costcentertest.CostCenter

public class CostCenter extends VdmEntity<CostCenter>

Original entity name from the Odata EDM: CostCenter

  • Field Details

    • ALL_FIELDS

      public static final CostCenterSelectable ALL_FIELDS
      Selector for all available fields of CostCenter.
    • COMPANY_CODE

      public static final CostCenterField<String> COMPANY_CODE
      Use with available fluent helpers to apply the CompanyCode field to query operations.
    • COST_CENTER_ID

      public static final CostCenterField<String> COST_CENTER_ID
      Use with available fluent helpers to apply the CostCenterID field to query operations.
    • VALIDITY_END_DATE

      public static final CostCenterField<LocalDateTime> VALIDITY_END_DATE
      Use with available fluent helpers to apply the ValidityEndDate field to query operations.
    • VALIDITY_START_DATE

      public static final CostCenterField<LocalDateTime> VALIDITY_START_DATE
      Use with available fluent helpers to apply the ValidityStartDate field to query operations.
    • STATUS

      public static final CostCenterField<String> STATUS
      Use with available fluent helpers to apply the Status field to query operations.
    • CATEGORY

      public static final CostCenterField<String> CATEGORY
      Use with available fluent helpers to apply the Category field to query operations.
    • LANGUAGE

      public static final CostCenterField<String> LANGUAGE
      Use with available fluent helpers to apply the Language field to query operations.
    • COST_CENTER_NAME

      public static final CostCenterField<String> COST_CENTER_NAME
      Use with available fluent helpers to apply the CostCenterName field to query operations.
    • COST_CENTER_DESCRIPTION

      public static final CostCenterField<String> COST_CENTER_DESCRIPTION
      Use with available fluent helpers to apply the CostCenterDescription field to query operations.
    • LAST_CHANGE_DATE_TIME

      public static final CostCenterField<LocalDateTime> LAST_CHANGE_DATE_TIME
      Use with available fluent helpers to apply the LastChangeDateTime field to query operations.
    • TO_COST_CENTER_TEXTS

      public static final CostCenterLink<CostCenterText> TO_COST_CENTER_TEXTS
      Use with available fluent helpers to apply the CostCenterTexts navigation property to query operations.
  • Constructor Details

  • Method Details

    • getType

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

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

      Original property name from the Odata EDM: CompanyCode

      Parameters:
      companyCode - The company code is an organizational unit within financial accounting.
    • setCostCenterID

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

      Original property name from the Odata EDM: CostCenterID

      Parameters:
      costCenterID - A key that uniquely identifies a cost center.
    • setValidityEndDate

      public void setValidityEndDate(@Nullable LocalDateTime validityEndDate)
      (Key Field) Constraints: Not nullable, Precision: 0

      Original property name from the Odata EDM: ValidityEndDate

      Parameters:
      validityEndDate - Date indicating up to when an entry is valid.
    • setValidityStartDate

      public void setValidityStartDate(@Nullable LocalDateTime validityStartDate)
      Constraints: Not nullable, Precision: 0

      Original property name from the Odata EDM: ValidityStartDate

      Parameters:
      validityStartDate - Date indicating as of when an entry is valid.
    • setStatus

      public void setStatus(@Nullable String status)
      Constraints: Not nullable, Maximum length: 10

      Original property name from the Odata EDM: Status

      Parameters:
      status - Character Field with Length 10
    • setCategory

      public void setCategory(@Nullable String category)
      Constraints: Not nullable, Maximum length: 1

      Original property name from the Odata EDM: Category

      The master data of an activity type includes one or more cost center categories. The activity type may be used only by cost centers of the appropriate categories.You define categories in Customizing. For each category, you can define default values for the "Lock" and "Record quantity" indicators, for transfer to cost center master data. Maintain these indicators only if the entry diverges from the default cost center category.In addition, you may use the categories for reports and evaluations.Production cost centerService cost centerAdministration cost center

      Parameters:
      category - Indicator used to define a cost center category.
    • setLanguage

      public void setLanguage(@Nullable String language)
      Constraints: Not nullable, Maximum length: 2

      Original property name from the Odata EDM: Language

      It corresponds to:1) All languages according to ISO 639.22) Languages assigned to specific countries or scripts1) Persian = 'FA'2) EnglishEnglish Australia = '1E'English Canada = '3E'English Ireland = '8E'English New Zealand = '1N'

      Parameters:
      language - SAP Language Key (2-letter code) for Unicode languages.
    • setCostCenterName

      public void setCostCenterName(@Nullable String costCenterName)
      Constraints: Not nullable, Maximum length: 20

      Original property name from the Odata EDM: CostCenterName

      Parameters:
      costCenterName - General description of the object.
    • setCostCenterDescription

      public void setCostCenterDescription(@Nullable String costCenterDescription)
      Constraints: Not nullable, Maximum length: 40

      Original property name from the Odata EDM: CostCenterDescription

      Parameters:
      costCenterDescription - A text that describes the object to which it refers in greater detail.
    • setLastChangeDateTime

      public void setLastChangeDateTime(@Nullable LocalDateTime lastChangeDateTime)
      Constraints: Not nullable, Precision: 0

      Original property name from the Odata EDM: LastChangeDateTime

      To normalize local times in a UTC time stamp and make them comparable, they must be converted using their time zone and the ABAP command convert.Although the time zone for the conversion can be fetched from customizing or master data, you should save it redundantly.The internal structure of the UTC time stamp is logically divided into a date and time part in packed number format . There is also a high resolution UTC time stamp (10^-7 seconds).

      Parameters:
      lastChangeDateTime - The UTC timestamp is the date and time relative to the UTC (Universal coordinated time).
    • getEntityCollection

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

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

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

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

      @Nonnull public static <T> CostCenterField<T> field(@Nonnull String fieldName, @Nonnull Class<T> fieldType)
      Use with available fluent helpers to apply an extension field to query operations.
      Type Parameters:
      T - The type of the extension field when performing value comparisons.
      Parameters:
      fieldName - The name of the extension field as returned by the OData service.
      fieldType - The Java type to use for the extension field when performing value comparisons.
      Returns:
      A representation of an extension field from this entity.
    • field

      @Nonnull public static <T, DomainT> CostCenterField<T> field(@Nonnull String fieldName, @Nonnull TypeConverter<T,DomainT> typeConverter)
      Use with available fluent helpers to apply an extension field to query operations.
      Type Parameters:
      T - The type of the extension field when performing value comparisons.
      DomainT - The type of the extension field as returned by the OData service.
      Parameters:
      typeConverter - A TypeConverter<T, DomainT> instance whose first generic type matches the Java type of the field
      fieldName - The name of the extension field as returned by the OData service.
      Returns:
      A representation of an extension field from this entity, holding a reference to the given TypeConverter.
    • getDestinationForFetch

      @Nullable public HttpDestinationProperties getDestinationForFetch()
      Overrides:
      getDestinationForFetch in class VdmEntity<CostCenter>
    • setServicePathForFetch

      protected void setServicePathForFetch(@Nullable String servicePathForFetch)
      Overrides:
      setServicePathForFetch in class VdmEntity<CostCenter>
    • attachToService

      public void attachToService(@Nullable String servicePath, @Nonnull HttpDestinationProperties destination)
      Overrides:
      attachToService in class VdmEntity<CostCenter>
    • getDefaultServicePath

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

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

      @Nonnull public List<CostCenterText> fetchCostCenterTexts()
      Fetches the CostCenterText entities (one to many) associated with this entity. This corresponds to the OData navigation property CostCenterTexts.

      Please note: This method will not cache or persist the query results.

      Returns:
      List containing one or more associated CostCenterText entities. If no entities are associated then an empty list is returned.
      Throws:
      com.sap.cloud.sdk.datamodel.odata.client.exception.ODataException - If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call.
    • getCostCenterTextsOrFetch

      @Nonnull public List<CostCenterText> getCostCenterTextsOrFetch()
      Retrieval of associated CostCenterText entities (one to many). This corresponds to the OData navigation property CostCenterTexts.

      If the navigation property CostCenterTexts of a queried CostCenter 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.

      Returns:
      List of associated CostCenterText entities.
      Throws:
      com.sap.cloud.sdk.datamodel.odata.client.exception.ODataException - If the entity is unmanaged, i.e. it has not been retrieved using the OData VDM's services and therefore has no ERP configuration context assigned. An entity is managed if it has been either retrieved using the VDM's services or returned from the VDM's services as the result of a CREATE or UPDATE call.
    • getCostCenterTextsIfPresent

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

      If the navigation property for an entity CostCenter 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 CostCenterTexts is already loaded, the result will contain the CostCenterText entities. If not, an Option with result state empty is returned.
    • setCostCenterTexts

      public void setCostCenterTexts(@Nonnull List<CostCenterText> value)
      Overwrites the list of associated CostCenterText entities for the loaded navigation property CostCenterTexts.

      If the navigation property CostCenterTexts of a queried CostCenter 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 CostCenterText entities.
    • addCostCenterTexts

      public void addCostCenterTexts(CostCenterText... entity)
      Adds elements to the list of associated CostCenterText entities. This corresponds to the OData navigation property CostCenterTexts.

      If the navigation property CostCenterTexts of a queried CostCenter 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 CostCenterText entities.
    • builder

      @Nonnull public static CostCenter.CostCenterBuilder builder()
    • getCompanyCode

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

      Original property name from the Odata EDM: CompanyCode

      Returns:
      The company code is an organizational unit within financial accounting.
    • getCostCenterID

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

      Original property name from the Odata EDM: CostCenterID

      Returns:
      A key that uniquely identifies a cost center.
    • getValidityEndDate

      @Nullable public LocalDateTime getValidityEndDate()
      (Key Field) Constraints: Not nullable, Precision: 0

      Original property name from the Odata EDM: ValidityEndDate

      Returns:
      Date indicating up to when an entry is valid.
    • getValidityStartDate

      @Nullable public LocalDateTime getValidityStartDate()
      Constraints: Not nullable, Precision: 0

      Original property name from the Odata EDM: ValidityStartDate

      Returns:
      Date indicating as of when an entry is valid.
    • getStatus

      @Nullable public String getStatus()
      Constraints: Not nullable, Maximum length: 10

      Original property name from the Odata EDM: Status

      Returns:
      Character Field with Length 10
    • getCategory

      @Nullable public String getCategory()
      Constraints: Not nullable, Maximum length: 1

      Original property name from the Odata EDM: Category

      The master data of an activity type includes one or more cost center categories. The activity type may be used only by cost centers of the appropriate categories.You define categories in Customizing. For each category, you can define default values for the "Lock" and "Record quantity" indicators, for transfer to cost center master data. Maintain these indicators only if the entry diverges from the default cost center category.In addition, you may use the categories for reports and evaluations.Production cost centerService cost centerAdministration cost center

      Returns:
      Indicator used to define a cost center category.
    • getLanguage

      @Nullable public String getLanguage()
      Constraints: Not nullable, Maximum length: 2

      Original property name from the Odata EDM: Language

      It corresponds to:1) All languages according to ISO 639.22) Languages assigned to specific countries or scripts1) Persian = 'FA'2) EnglishEnglish Australia = '1E'English Canada = '3E'English Ireland = '8E'English New Zealand = '1N'

      Returns:
      SAP Language Key (2-letter code) for Unicode languages.
    • getCostCenterName

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

      Original property name from the Odata EDM: CostCenterName

      Returns:
      General description of the object.
    • getCostCenterDescription

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

      Original property name from the Odata EDM: CostCenterDescription

      Returns:
      A text that describes the object to which it refers in greater detail.
    • getLastChangeDateTime

      @Nullable public LocalDateTime getLastChangeDateTime()
      Constraints: Not nullable, Precision: 0

      Original property name from the Odata EDM: LastChangeDateTime

      To normalize local times in a UTC time stamp and make them comparable, they must be converted using their time zone and the ABAP command convert.Although the time zone for the conversion can be fetched from customizing or master data, you should save it redundantly.The internal structure of the UTC time stamp is logically divided into a date and time part in packed number format . There is also a high resolution UTC time stamp (10^-7 seconds).

      Returns:
      The UTC timestamp is the date and time relative to the UTC (Universal coordinated time).
    • toString

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

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

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

      public int hashCode()
      Overrides:
      hashCode in class VdmEntity<CostCenter>