public class CostCenter extends VdmEntity<CostCenter>
Original entity name from the Odata EDM: CostCenter
Modifier and Type | Class and Description |
---|---|
static class |
CostCenter.CostCenterBuilder
Helper class to allow for fluent creation of CostCenter instances.
|
Modifier and Type | Field and Description |
---|---|
static CostCenterSelectable |
ALL_FIELDS
Selector for all available fields of CostCenter.
|
static CostCenterField<String> |
CATEGORY
Use with available fluent helpers to apply the Category field to query operations.
|
static CostCenterField<String> |
COMPANY_CODE
Use with available fluent helpers to apply the CompanyCode field to query operations.
|
static CostCenterField<String> |
COST_CENTER_DESCRIPTION
Use with available fluent helpers to apply the CostCenterDescription field to query operations.
|
static CostCenterField<String> |
COST_CENTER_ID
Use with available fluent helpers to apply the CostCenterID field to query operations.
|
static CostCenterField<String> |
COST_CENTER_NAME
Use with available fluent helpers to apply the CostCenterName field to query operations.
|
static CostCenterField<String> |
LANGUAGE
Use with available fluent helpers to apply the Language field to query operations.
|
static CostCenterField<LocalDateTime> |
LAST_CHANGE_DATE_TIME
Use with available fluent helpers to apply the LastChangeDateTime field to query operations.
|
static CostCenterField<String> |
STATUS
Use with available fluent helpers to apply the Status field to query operations.
|
static CostCenterLink<CostCenterText> |
TO_COST_CENTER_TEXTS
Use with available fluent helpers to apply the CostCenterTexts navigation property to query operations.
|
static CostCenterField<LocalDateTime> |
VALIDITY_END_DATE
Use with available fluent helpers to apply the ValidityEndDate field to query operations.
|
static CostCenterField<LocalDateTime> |
VALIDITY_START_DATE
Use with available fluent helpers to apply the ValidityStartDate field to query operations.
|
changedOriginalFields
Constructor and Description |
---|
CostCenter() |
CostCenter(String companyCode,
String costCenterID,
LocalDateTime validityEndDate,
LocalDateTime validityStartDate,
String status,
String category,
String language,
String costCenterName,
String costCenterDescription,
LocalDateTime lastChangeDateTime,
List<CostCenterText> toCostCenterTexts) |
Modifier and Type | Method and Description |
---|---|
void |
addCostCenterTexts(CostCenterText... entity)
Adds elements to the list of associated CostCenterText entities.
|
void |
attachToService(String servicePath,
HttpDestinationProperties destination)
Sets the service path and destination for the fetch commands of this entity.
|
static CostCenter.CostCenterBuilder |
builder() |
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
List<CostCenterText> |
fetchCostCenterTexts()
Fetches the CostCenterText entities (one to many) associated with this entity.
|
static <T> CostCenterField<T> |
field(String fieldName,
Class<T> fieldType)
Use with available fluent helpers to apply an extension field to query operations.
|
static <T,DomainT> |
field(String fieldName,
TypeConverter<T,DomainT> typeConverter)
Use with available fluent helpers to apply an extension field to query operations.
|
protected void |
fromMap(Map<String,Object> inputValues) |
String |
getCategory()
Constraints: Not nullable, Maximum length: 1
|
String |
getCompanyCode()
(Key Field) Constraints: Not nullable, Maximum length: 4
|
String |
getCostCenterDescription()
Constraints: Not nullable, Maximum length: 40
|
String |
getCostCenterID()
(Key Field) Constraints: Not nullable, Maximum length: 10
|
String |
getCostCenterName()
Constraints: Not nullable, Maximum length: 20
|
io.vavr.control.Option<List<CostCenterText>> |
getCostCenterTextsIfPresent()
Retrieval of associated CostCenterText entities (one to many).
|
List<CostCenterText> |
getCostCenterTextsOrFetch()
Retrieval of associated CostCenterText entities (one to many).
|
protected String |
getDefaultServicePath()
Used by fluent helpers and navigation property methods to construct OData queries.
|
HttpDestinationProperties |
getDestinationForFetch()
Convienence field for reusing the same destination with multiple queries (e.g.
|
protected String |
getEntityCollection()
Used by fluent helpers and navigation property methods to construct OData queries.
|
protected Map<String,Object> |
getKey() |
String |
getLanguage()
Constraints: Not nullable, Maximum length: 2
|
LocalDateTime |
getLastChangeDateTime()
Constraints: Not nullable, Precision: 0
|
String |
getStatus()
Constraints: Not nullable, Maximum length: 10
|
Class<CostCenter> |
getType() |
LocalDateTime |
getValidityEndDate()
(Key Field) Constraints: Not nullable, Precision: 0
|
LocalDateTime |
getValidityStartDate()
Constraints: Not nullable, Precision: 0
|
int |
hashCode() |
void |
setCategory(String category)
Constraints: Not nullable, Maximum length: 1
|
void |
setCompanyCode(String companyCode)
(Key Field) Constraints: Not nullable, Maximum length: 4
|
void |
setCostCenterDescription(String costCenterDescription)
Constraints: Not nullable, Maximum length: 40
|
void |
setCostCenterID(String costCenterID)
(Key Field) Constraints: Not nullable, Maximum length: 10
|
void |
setCostCenterName(String costCenterName)
Constraints: Not nullable, Maximum length: 20
|
void |
setCostCenterTexts(List<CostCenterText> value)
Overwrites the list of associated CostCenterText entities for the loaded navigation property
CostCenterTexts.
|
void |
setLanguage(String language)
Constraints: Not nullable, Maximum length: 2
|
void |
setLastChangeDateTime(LocalDateTime lastChangeDateTime)
Constraints: Not nullable, Precision: 0
|
protected void |
setServicePathForFetch(String servicePathForFetch)
The service path only used for the fetch commands of this entity.
|
void |
setStatus(String status)
Constraints: Not nullable, Maximum length: 10
|
void |
setValidityEndDate(LocalDateTime validityEndDate)
(Key Field) Constraints: Not nullable, Precision: 0
|
void |
setValidityStartDate(LocalDateTime validityStartDate)
Constraints: Not nullable, Precision: 0
|
protected Map<String,Object> |
toMapOfFields() |
protected Map<String,Object> |
toMapOfNavigationProperties() |
String |
toString() |
getServicePathForFetch, getVersionIdentifier, setDestinationForFetch, setVersionIdentifier
getChangedFields, getCustomField, getCustomField, getCustomFieldNames, getCustomFields, getSetOfCustomFields, getSetOfFields, getSetOfNavigationProperties, hasCustomField, hasCustomField, rememberChangedField, resetChangedFields, setCustomField, setCustomField, toMap, toMapOfCustomFields
public static final CostCenterSelectable ALL_FIELDS
public static final CostCenterField<String> COMPANY_CODE
public static final CostCenterField<String> COST_CENTER_ID
public static final CostCenterField<LocalDateTime> VALIDITY_END_DATE
public static final CostCenterField<LocalDateTime> VALIDITY_START_DATE
public static final CostCenterField<String> STATUS
public static final CostCenterField<String> CATEGORY
public static final CostCenterField<String> LANGUAGE
public static final CostCenterField<String> COST_CENTER_NAME
public static final CostCenterField<String> COST_CENTER_DESCRIPTION
public static final CostCenterField<LocalDateTime> LAST_CHANGE_DATE_TIME
public static final CostCenterLink<CostCenterText> TO_COST_CENTER_TEXTS
public 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)
@Nonnull public Class<CostCenter> getType()
getType
in class VdmObject<CostCenter>
public void setCompanyCode(@Nullable String companyCode)
Original property name from the Odata EDM: CompanyCode
companyCode
- The company code is an organizational unit within financial accounting.public void setCostCenterID(@Nullable String costCenterID)
Original property name from the Odata EDM: CostCenterID
costCenterID
- A key that uniquely identifies a cost center.public void setValidityEndDate(@Nullable LocalDateTime validityEndDate)
Original property name from the Odata EDM: ValidityEndDate
validityEndDate
- Date indicating up to when an entry is valid.public void setValidityStartDate(@Nullable LocalDateTime validityStartDate)
Original property name from the Odata EDM: ValidityStartDate
validityStartDate
- Date indicating as of when an entry is valid.public void setStatus(@Nullable String status)
Original property name from the Odata EDM: Status
status
- Character Field with Length 10public void setCategory(@Nullable String category)
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
category
- Indicator used to define a cost center category.public void setLanguage(@Nullable String language)
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'
language
- SAP Language Key (2-letter code) for Unicode languages.public void setCostCenterName(@Nullable String costCenterName)
Original property name from the Odata EDM: CostCenterName
costCenterName
- General description of the object.public void setCostCenterDescription(@Nullable String costCenterDescription)
Original property name from the Odata EDM: CostCenterDescription
costCenterDescription
- A text that describes the object to which it refers in greater detail.public void setLastChangeDateTime(@Nullable LocalDateTime lastChangeDateTime)
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
lastChangeDateTime
- The UTC timestamp is the date and time relative to the UTC (Universal coordinated time).protected String getEntityCollection()
VdmEntity
getEntityCollection
in class VdmEntity<CostCenter>
@Nonnull protected Map<String,Object> getKey()
getKey
in class VdmObject<CostCenter>
@Nonnull protected Map<String,Object> toMapOfFields()
toMapOfFields
in class VdmObject<CostCenter>
protected void fromMap(Map<String,Object> inputValues)
fromMap
in class VdmObject<CostCenter>
@Nonnull public static <T> CostCenterField<T> field(@Nonnull String fieldName, @Nonnull Class<T> fieldType)
T
- The type of the extension field when performing value comparisons.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.@Nonnull public static <T,DomainT> CostCenterField<T> field(@Nonnull String fieldName, @Nonnull TypeConverter<T,DomainT> typeConverter)
T
- The type of the extension field when performing value comparisons.DomainT
- The type of the extension field as returned by the OData service.typeConverter
- A TypeConverterfieldName
- The name of the extension field as returned by the OData service.@Nullable public HttpDestinationProperties getDestinationForFetch()
VdmEntity
getDestinationForFetch
in class VdmEntity<CostCenter>
protected void setServicePathForFetch(@Nullable String servicePathForFetch)
VdmEntity
Note: Use with caution, as this can easily break the fetch call on this entity. See the interface of the corresponding service for the default service path.
setServicePathForFetch
in class VdmEntity<CostCenter>
public void attachToService(@Nullable String servicePath, @Nonnull HttpDestinationProperties destination)
VdmEntity
Note: Use with caution, as this can easily break the fetch calls on this entity. See the interface of the corresponding service for the default service path.
attachToService
in class VdmEntity<CostCenter>
servicePath
- Optional parameter. New service path to apply to this entity and any associated entities that were
previously fetched. If a null value is provided and the service path has never been set, then the
service path will be set to the default defined in the corresponding service interface.destination
- New destination to apply to this entity and any associated entities that were previously fetched.protected String getDefaultServicePath()
VdmEntity
getDefaultServicePath
in class VdmEntity<CostCenter>
protocol://hostname:port
and the OData resource name (entity set, $metadata
, etc.)@Nonnull protected Map<String,Object> toMapOfNavigationProperties()
toMapOfNavigationProperties
in class VdmObject<CostCenter>
@Nonnull public List<CostCenterText> fetchCostCenterTexts() throws com.sap.cloud.sdk.odatav2.connectivity.ODataException
Please note: This method will not cache or persist the query results.
com.sap.cloud.sdk.odatav2.connectivity.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.@Nonnull public List<CostCenterText> getCostCenterTextsOrFetch() throws com.sap.cloud.sdk.odatav2.connectivity.ODataException
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.
com.sap.cloud.sdk.odatav2.connectivity.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.@Nonnull public io.vavr.control.Option<List<CostCenterText>> getCostCenterTextsIfPresent()
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
.
Option
with result state
empty
is returned.public void setCostCenterTexts(@Nonnull List<CostCenterText> value)
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.
value
- List of CostCenterText entities.public void addCostCenterTexts(CostCenterText... entity)
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.
entity
- Array of CostCenterText entities.public static CostCenter.CostCenterBuilder builder()
@Nullable public String getCompanyCode()
Original property name from the Odata EDM: CompanyCode
@Nullable public String getCostCenterID()
Original property name from the Odata EDM: CostCenterID
@Nullable public LocalDateTime getValidityEndDate()
Original property name from the Odata EDM: ValidityEndDate
@Nullable public LocalDateTime getValidityStartDate()
Original property name from the Odata EDM: ValidityStartDate
@Nullable public String getStatus()
Original property name from the Odata EDM: Status
@Nullable public String getCategory()
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
@Nullable public String getLanguage()
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'
@Nullable public String getCostCenterName()
Original property name from the Odata EDM: CostCenterName
@Nullable public String getCostCenterDescription()
Original property name from the Odata EDM: CostCenterDescription
@Nullable public LocalDateTime getLastChangeDateTime()
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
public String toString()
toString
in class VdmObject<CostCenter>
public boolean equals(Object o)
equals
in class VdmObject<CostCenter>
protected boolean canEqual(Object other)
canEqual
in class VdmObject<CostCenter>
public int hashCode()
hashCode
in class VdmObject<CostCenter>
Copyright © 2020 SAP SE. All rights reserved.