Class CostCenter
Original entity name from the Odata EDM: CostCenter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classHelper class to allow for fluent creation of CostCenter instances. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CostCenterSelectableSelector for all available fields of CostCenter.static final CostCenterField<String>Use with available fluent helpers to apply the Category field to query operations.static final CostCenterField<String>Use with available fluent helpers to apply the CompanyCode field to query operations.static final CostCenterField<String>Use with available fluent helpers to apply the CostCenterDescription field to query operations.static final CostCenterField<String>Use with available fluent helpers to apply the CostCenterID field to query operations.static final CostCenterField<String>Use with available fluent helpers to apply the CostCenterName field to query operations.static final CostCenterField<String>Use with available fluent helpers to apply the Language field to query operations.static final CostCenterField<LocalDateTime>Use with available fluent helpers to apply the LastChangeDateTime field to query operations.static final CostCenterField<String>Use with available fluent helpers to apply the Status field to query operations.static final CostCenterLink<CostCenterText>Use with available fluent helpers to apply the CostCenterTexts navigation property to query operations.static final CostCenterField<LocalDateTime>Use with available fluent helpers to apply the ValidityEndDate field to query operations.static final CostCenterField<LocalDateTime>Use with available fluent helpers to apply the ValidityStartDate field to query operations.Fields inherited from class com.sap.cloud.sdk.datamodel.odata.helper.VdmObject
changedOriginalFields -
Constructor Summary
ConstructorsConstructorDescriptionCostCenter(String companyCode, String costCenterID, LocalDateTime validityEndDate, LocalDateTime validityStartDate, String status, String category, String language, String costCenterName, String costCenterDescription, LocalDateTime lastChangeDateTime, List<CostCenterText> toCostCenterTexts) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCostCenterTexts(CostCenterText... entity) Adds elements to the list of associated CostCenterText entities.voidattachToService(String servicePath, HttpDestinationProperties destination) static CostCenter.CostCenterBuilderbuilder()protected booleanbooleanFetches the CostCenterText entities (one to many) associated with this entity.static <T,DomainT>
CostCenterField<T>field(String fieldName, TypeConverter<T, DomainT> typeConverter) Use with available fluent helpers to apply an extension field to query operations.static <T> CostCenterField<T>Use with available fluent helpers to apply an extension field to query operations.protected voidConstraints: Not nullable, Maximum length: 1(Key Field) Constraints: Not nullable, Maximum length: 4Constraints: Not nullable, Maximum length: 40(Key Field) Constraints: Not nullable, Maximum length: 10Constraints: Not nullable, Maximum length: 20io.vavr.control.Option<List<CostCenterText>>Retrieval of associated CostCenterText entities (one to many).Retrieval of associated CostCenterText entities (one to many).protected Stringprotected StringgetKey()Constraints: Not nullable, Maximum length: 2Constraints: Not nullable, Precision: 0Constraints: Not nullable, Maximum length: 10getType()(Key Field) Constraints: Not nullable, Precision: 0Constraints: Not nullable, Precision: 0inthashCode()voidsetCategory(String category) Constraints: Not nullable, Maximum length: 1voidsetCompanyCode(String companyCode) (Key Field) Constraints: Not nullable, Maximum length: 4voidsetCostCenterDescription(String costCenterDescription) Constraints: Not nullable, Maximum length: 40voidsetCostCenterID(String costCenterID) (Key Field) Constraints: Not nullable, Maximum length: 10voidsetCostCenterName(String costCenterName) Constraints: Not nullable, Maximum length: 20voidsetCostCenterTexts(List<CostCenterText> value) Overwrites the list of associated CostCenterText entities for the loaded navigation property CostCenterTexts.voidsetLanguage(String language) Constraints: Not nullable, Maximum length: 2voidsetLastChangeDateTime(LocalDateTime lastChangeDateTime) Constraints: Not nullable, Precision: 0protected voidsetServicePathForFetch(String servicePathForFetch) voidConstraints: Not nullable, Maximum length: 10voidsetValidityEndDate(LocalDateTime validityEndDate) (Key Field) Constraints: Not nullable, Precision: 0voidsetValidityStartDate(LocalDateTime validityStartDate) Constraints: Not nullable, Precision: 0toString()Methods inherited from class com.sap.cloud.sdk.datamodel.odata.helper.VdmEntity
fetchFieldAsList, fetchFieldAsSingle, getServicePathForFetch, getVersionIdentifier, setDestinationForFetch, setVersionIdentifierMethods inherited from class com.sap.cloud.sdk.datamodel.odata.helper.VdmObject
getChangedFields, getCustomField, getCustomField, getCustomFieldNames, getCustomFields, getSetOfCustomFields, getSetOfFields, getSetOfNavigationProperties, hasCustomField, hasCustomField, rememberChangedField, resetChangedFields, setCustomField, setCustomField, toMap, toMapOfCustomFields
-
Field Details
-
ALL_FIELDS
Selector for all available fields of CostCenter. -
COMPANY_CODE
Use with available fluent helpers to apply the CompanyCode field to query operations. -
COST_CENTER_ID
Use with available fluent helpers to apply the CostCenterID field to query operations. -
VALIDITY_END_DATE
Use with available fluent helpers to apply the ValidityEndDate field to query operations. -
VALIDITY_START_DATE
Use with available fluent helpers to apply the ValidityStartDate field to query operations. -
STATUS
Use with available fluent helpers to apply the Status field to query operations. -
CATEGORY
Use with available fluent helpers to apply the Category field to query operations. -
LANGUAGE
Use with available fluent helpers to apply the Language field to query operations. -
COST_CENTER_NAME
Use with available fluent helpers to apply the CostCenterName field to query operations. -
COST_CENTER_DESCRIPTION
Use with available fluent helpers to apply the CostCenterDescription field to query operations. -
LAST_CHANGE_DATE_TIME
Use with available fluent helpers to apply the LastChangeDateTime field to query operations. -
TO_COST_CENTER_TEXTS
Use with available fluent helpers to apply the CostCenterTexts navigation property to query operations.
-
-
Constructor Details
-
CostCenter
public CostCenter() -
CostCenter
public CostCenter(@Nullable String companyCode, @Nullable String costCenterID, @Nullable LocalDateTime validityEndDate, @Nullable LocalDateTime validityStartDate, @Nullable String status, @Nullable String category, @Nullable String language, @Nullable String costCenterName, @Nullable String costCenterDescription, @Nullable LocalDateTime lastChangeDateTime, List<CostCenterText> toCostCenterTexts)
-
-
Method Details
-
getType
- Specified by:
getTypein classVdmObject<CostCenter>
-
setCompanyCode
(Key Field) Constraints: Not nullable, Maximum length: 4Original property name from the Odata EDM: CompanyCode
- Parameters:
companyCode- The company code is an organizational unit within financial accounting.
-
setCostCenterID
(Key Field) Constraints: Not nullable, Maximum length: 10Original property name from the Odata EDM: CostCenterID
- Parameters:
costCenterID- A key that uniquely identifies a cost center.
-
setValidityEndDate
(Key Field) Constraints: Not nullable, Precision: 0Original property name from the Odata EDM: ValidityEndDate
- Parameters:
validityEndDate- Date indicating up to when an entry is valid.
-
setValidityStartDate
Constraints: Not nullable, Precision: 0Original property name from the Odata EDM: ValidityStartDate
- Parameters:
validityStartDate- Date indicating as of when an entry is valid.
-
setStatus
Constraints: Not nullable, Maximum length: 10Original property name from the Odata EDM: Status
- Parameters:
status- Character Field with Length 10
-
setCategory
Constraints: Not nullable, Maximum length: 1Original 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
Constraints: Not nullable, Maximum length: 2Original 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
Constraints: Not nullable, Maximum length: 20Original property name from the Odata EDM: CostCenterName
- Parameters:
costCenterName- General description of the object.
-
setCostCenterDescription
Constraints: Not nullable, Maximum length: 40Original property name from the Odata EDM: CostCenterDescription
- Parameters:
costCenterDescription- A text that describes the object to which it refers in greater detail.
-
setLastChangeDateTime
Constraints: Not nullable, Precision: 0Original 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
- Specified by:
getEntityCollectionin classVdmEntity<CostCenter>
-
getKey
- Overrides:
getKeyin classVdmObject<CostCenter>
-
toMapOfFields
- Overrides:
toMapOfFieldsin classVdmObject<CostCenter>
-
fromMap
- Overrides:
fromMapin classVdmObject<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 fieldfieldName- 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
- Overrides:
getDestinationForFetchin classVdmEntity<CostCenter>
-
setServicePathForFetch
- Overrides:
setServicePathForFetchin classVdmEntity<CostCenter>
-
attachToService
public void attachToService(@Nullable String servicePath, @Nonnull HttpDestinationProperties destination) - Overrides:
attachToServicein classVdmEntity<CostCenter>
-
getDefaultServicePath
- Overrides:
getDefaultServicePathin classVdmEntity<CostCenter>
-
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
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
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
Optionresult state will beempty.- Returns:
- If the information for navigation property CostCenterTexts is already loaded, the result will
contain the CostCenterText entities. If not, an
Optionwith result stateemptyis returned.
-
setCostCenterTexts
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
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
-
getCompanyCode
(Key Field) Constraints: Not nullable, Maximum length: 4Original property name from the Odata EDM: CompanyCode
- Returns:
- The company code is an organizational unit within financial accounting.
-
getCostCenterID
(Key Field) Constraints: Not nullable, Maximum length: 10Original property name from the Odata EDM: CostCenterID
- Returns:
- A key that uniquely identifies a cost center.
-
getValidityEndDate
(Key Field) Constraints: Not nullable, Precision: 0Original property name from the Odata EDM: ValidityEndDate
- Returns:
- Date indicating up to when an entry is valid.
-
getValidityStartDate
Constraints: Not nullable, Precision: 0Original property name from the Odata EDM: ValidityStartDate
- Returns:
- Date indicating as of when an entry is valid.
-
getStatus
Constraints: Not nullable, Maximum length: 10Original property name from the Odata EDM: Status
- Returns:
- Character Field with Length 10
-
getCategory
Constraints: Not nullable, Maximum length: 1Original 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
Constraints: Not nullable, Maximum length: 2Original 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
Constraints: Not nullable, Maximum length: 20Original property name from the Odata EDM: CostCenterName
- Returns:
- General description of the object.
-
getCostCenterDescription
Constraints: Not nullable, Maximum length: 40Original property name from the Odata EDM: CostCenterDescription
- Returns:
- A text that describes the object to which it refers in greater detail.
-
getLastChangeDateTime
Constraints: Not nullable, Precision: 0Original 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
- Overrides:
toStringin classVdmObject<CostCenter>
-
equals
- Overrides:
equalsin classVdmEntity<CostCenter>
-
canEqual
- Overrides:
canEqualin classVdmEntity<CostCenter>
-
hashCode
public int hashCode()- Overrides:
hashCodein classVdmEntity<CostCenter>
-