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,
ErpConfigContext configContext)
Sets the service path and ERP configuration context 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
|
Optional<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() |
protected String |
getEntityCollection() |
ErpConfigContext |
getErpConfigContext()
Convienence field for reusing the same ERP system context with multiple queries (e.g.
|
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 |
setErpConfigContext(ErpConfigContext erpConfigContext)
Deprecated.
Use
attachToService(String, ErpConfigContext) instead. |
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() |
getEndpointUrl, getServicePathForFetch, getVersionIdentifier, 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
- Company Codepublic void setCostCenterID(@Nullable String costCenterID)
Original property name from the Odata EDM: CostCenterID
costCenterID
- Cost Centerpublic void setValidityEndDate(@Nullable LocalDateTime validityEndDate)
Original property name from the Odata EDM: ValidityEndDate
validityEndDate
- Valid Topublic void setValidityStartDate(@Nullable LocalDateTime validityStartDate)
Original property name from the Odata EDM: ValidityStartDate
validityStartDate
- Valid Frompublic void setStatus(@Nullable String status)
Original property name from the Odata EDM: Status
status
- Character Field Length = 10public void setCategory(@Nullable String category)
Original property name from the Odata EDM: Category
category
- CCtr Categorypublic void setLanguage(@Nullable String language)
Original property name from the Odata EDM: Language
language
- Language Keypublic void setCostCenterName(@Nullable String costCenterName)
Original property name from the Odata EDM: CostCenterName
costCenterName
- Namepublic void setCostCenterDescription(@Nullable String costCenterDescription)
Original property name from the Odata EDM: CostCenterDescription
costCenterDescription
- Long Textpublic void setLastChangeDateTime(@Nullable LocalDateTime lastChangeDateTime)
Original property name from the Odata EDM: LastChangeDateTime
lastChangeDateTime
- Time Stampprotected String getEntityCollection()
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 ErpConfigContext getErpConfigContext()
VdmEntity
getErpConfigContext
in class VdmEntity<CostCenter>
@Deprecated public void setErpConfigContext(@Nullable ErpConfigContext erpConfigContext)
attachToService(String, ErpConfigContext)
instead.VdmEntity
setErpConfigContext
in class VdmEntity<CostCenter>
erpConfigContext
- New ERP configuration context to apply to this entityprotected 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, @Nullable ErpConfigContext configContext)
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.configContext
- Optional parameter. New ERP configuration context to apply to this entity and any associated entities
that were previously fetched. If a null value is provided and the ERP configuration context has never
been set, then the ERP configuration context will be set to a new instance of
ErpConfigContext
.protected String getDefaultServicePath()
getDefaultServicePath
in class VdmEntity<CostCenter>
@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 Optional<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 Optional
result state will be empty
.
Optional
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
@Nullable public String getLanguage()
Original property name from the Odata EDM: Language
@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
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 © 2019 SAP SE. All rights reserved.