public class WorkPackage extends VdmEntity<WorkPackage>
Original entity name from the Odata EDM: WorkPackage
Modifier and Type | Class and Description |
---|---|
static class |
WorkPackage.WorkPackageBuilder
Helper class to allow for fluent creation of WorkPackage instances.
|
Modifier and Type | Field and Description |
---|---|
static WorkPackageSelectable |
ALL_FIELDS
Selector for all available fields of WorkPackage.
|
static WorkPackageField<String> |
DESCRIPTION
Use with available fluent helpers to apply the Description field to query operations.
|
static WorkPackageField<String> |
PROJECT_ID
Use with available fluent helpers to apply the ProjectID field to query operations.
|
static WorkPackageLink<Demand> |
TO_DEMAND_SET
Use with available fluent helpers to apply the DemandSet navigation property to query operations.
|
static WorkPackageLink<WorkItem> |
TO_WORK_ITEM_SET
Use with available fluent helpers to apply the WorkItemSet navigation property to query operations.
|
static WorkPackageField<String> |
WORK_PACKAGE_ID
Use with available fluent helpers to apply the WorkPackageID field to query operations.
|
static WorkPackageField<String> |
WORK_PACKAGE_NAME
Use with available fluent helpers to apply the WorkPackageName field to query operations.
|
static WorkPackageField<LocalDateTime> |
WP_END_DATE
Use with available fluent helpers to apply the WPEndDate field to query operations.
|
static WorkPackageField<LocalDateTime> |
WP_START_DATE
Use with available fluent helpers to apply the WPStartDate field to query operations.
|
changedOriginalFields
Constructor and Description |
---|
WorkPackage() |
WorkPackage(String projectID,
String description,
String workPackageID,
String workPackageName,
LocalDateTime wPStartDate,
LocalDateTime wPEndDate,
List<WorkItem> toWorkItemSet,
List<Demand> toDemandSet) |
Modifier and Type | Method and Description |
---|---|
void |
addDemandSet(Demand... entity)
Adds elements to the list of associated Demand entities.
|
void |
addWorkItemSet(WorkItem... entity)
Adds elements to the list of associated WorkItem entities.
|
void |
attachToService(String servicePath,
ErpConfigContext configContext)
Sets the service path and ERP configuration context for the fetch commands of this entity.
|
static WorkPackage.WorkPackageBuilder |
builder() |
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
List<Demand> |
fetchDemandSet()
Fetches the Demand entities (one to many) associated with this entity.
|
List<WorkItem> |
fetchWorkItemSet()
Fetches the WorkItem entities (one to many) associated with this entity.
|
static <T> WorkPackageField<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) |
protected String |
getDefaultServicePath() |
Optional<List<Demand>> |
getDemandSetIfPresent()
Retrieval of associated Demand entities (one to many).
|
List<Demand> |
getDemandSetOrFetch()
Retrieval of associated Demand entities (one to many).
|
String |
getDescription()
Constraints: none
|
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 |
getProjectID()
(Key Field) Constraints: Not nullable, Maximum length: 40
|
Class<WorkPackage> |
getType() |
Optional<List<WorkItem>> |
getWorkItemSetIfPresent()
Retrieval of associated WorkItem entities (one to many).
|
List<WorkItem> |
getWorkItemSetOrFetch()
Retrieval of associated WorkItem entities (one to many).
|
String |
getWorkPackageID()
(Key Field) Constraints: Not nullable, Maximum length: 50
|
String |
getWorkPackageName()
(Key Field) Constraints: Not nullable, Maximum length: 60
|
LocalDateTime |
getWPEndDate()
Constraints: Not nullable, Precision: 7
|
LocalDateTime |
getWPStartDate()
Constraints: Not nullable, Precision: 7
|
int |
hashCode() |
void |
setDemandSet(List<Demand> value)
Overwrites the list of associated Demand entities for the loaded navigation property DemandSet.
|
void |
setDescription(String description)
Constraints: none
|
void |
setErpConfigContext(ErpConfigContext erpConfigContext)
Deprecated.
Use
attachToService(String, ErpConfigContext) instead. |
void |
setProjectID(String projectID)
(Key Field) Constraints: Not nullable, Maximum length: 40
|
protected void |
setServicePathForFetch(String servicePathForFetch)
The service path only used for the fetch commands of this entity.
|
void |
setWorkItemSet(List<WorkItem> value)
Overwrites the list of associated WorkItem entities for the loaded navigation property WorkItemSet.
|
void |
setWorkPackageID(String workPackageID)
(Key Field) Constraints: Not nullable, Maximum length: 50
|
void |
setWorkPackageName(String workPackageName)
(Key Field) Constraints: Not nullable, Maximum length: 60
|
void |
setWPEndDate(LocalDateTime wPEndDate)
Constraints: Not nullable, Precision: 7
|
void |
setWPStartDate(LocalDateTime wPStartDate)
Constraints: Not nullable, Precision: 7
|
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 WorkPackageSelectable ALL_FIELDS
public static final WorkPackageField<String> PROJECT_ID
public static final WorkPackageField<String> DESCRIPTION
public static final WorkPackageField<String> WORK_PACKAGE_ID
public static final WorkPackageField<String> WORK_PACKAGE_NAME
public static final WorkPackageField<LocalDateTime> WP_START_DATE
public static final WorkPackageField<LocalDateTime> WP_END_DATE
public static final WorkPackageLink<WorkItem> TO_WORK_ITEM_SET
public static final WorkPackageLink<Demand> TO_DEMAND_SET
@Nonnull public Class<WorkPackage> getType()
getType
in class VdmObject<WorkPackage>
public void setProjectID(@Nullable String projectID)
Original property name from the Odata EDM: ProjectID
projectID
- Identifies a master project.public void setDescription(@Nullable String description)
Original property name from the Odata EDM: Description
description
- Work Package Desc.public void setWorkPackageID(@Nullable String workPackageID)
Original property name from the Odata EDM: WorkPackageID
workPackageID
- Plan Itempublic void setWorkPackageName(@Nullable String workPackageName)
Original property name from the Odata EDM: WorkPackageName
workPackageName
- Plan Item Descriptionpublic void setWPStartDate(@Nullable LocalDateTime wPStartDate)
Original property name from the Odata EDM: WPStartDate
Provides the planning horizon. By default, the dates are taken from the assigned master project.
wPStartDate
- Raw Textpublic void setWPEndDate(@Nullable LocalDateTime wPEndDate)
Original property name from the Odata EDM: WPEndDate
Provides the planning horizon. By default, the dates are taken from the assigned master project.
wPEndDate
- Raw Textprotected String getEntityCollection()
getEntityCollection
in class VdmEntity<WorkPackage>
@Nonnull protected Map<String,Object> getKey()
getKey
in class VdmObject<WorkPackage>
@Nonnull protected Map<String,Object> toMapOfFields()
toMapOfFields
in class VdmObject<WorkPackage>
protected void fromMap(Map<String,Object> inputValues)
fromMap
in class VdmObject<WorkPackage>
@Nonnull public static <T> WorkPackageField<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> WorkPackageField<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<WorkPackage>
@Deprecated public void setErpConfigContext(@Nullable ErpConfigContext erpConfigContext)
attachToService(String, ErpConfigContext)
instead.VdmEntity
setErpConfigContext
in class VdmEntity<WorkPackage>
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<WorkPackage>
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<WorkPackage>
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<WorkPackage>
@Nonnull protected Map<String,Object> toMapOfNavigationProperties()
toMapOfNavigationProperties
in class VdmObject<WorkPackage>
@Nonnull public List<WorkItem> fetchWorkItemSet() 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<WorkItem> getWorkItemSetOrFetch() throws com.sap.cloud.sdk.odatav2.connectivity.ODataException
If the navigation property WorkItemSet of a queried WorkPackage 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<WorkItem>> getWorkItemSetIfPresent()
If the navigation property for an entity WorkPackage 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 setWorkItemSet(@Nonnull List<WorkItem> value)
If the navigation property WorkItemSet of a queried WorkPackage 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 WorkItem entities.public void addWorkItemSet(WorkItem... entity)
If the navigation property WorkItemSet of a queried WorkPackage 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 WorkItem entities.@Nonnull public List<Demand> fetchDemandSet() 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<Demand> getDemandSetOrFetch() throws com.sap.cloud.sdk.odatav2.connectivity.ODataException
If the navigation property DemandSet of a queried WorkPackage 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<Demand>> getDemandSetIfPresent()
If the navigation property for an entity WorkPackage 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 setDemandSet(@Nonnull List<Demand> value)
If the navigation property DemandSet of a queried WorkPackage 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 Demand entities.public void addDemandSet(Demand... entity)
If the navigation property DemandSet of a queried WorkPackage 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 Demand entities.public static WorkPackage.WorkPackageBuilder builder()
@Nullable public String getProjectID()
Original property name from the Odata EDM: ProjectID
@Nullable public String getDescription()
Original property name from the Odata EDM: Description
@Nullable public String getWorkPackageID()
Original property name from the Odata EDM: WorkPackageID
@Nullable public String getWorkPackageName()
Original property name from the Odata EDM: WorkPackageName
@Nullable public LocalDateTime getWPStartDate()
Original property name from the Odata EDM: WPStartDate
Provides the planning horizon. By default, the dates are taken from the assigned master project.
@Nullable public LocalDateTime getWPEndDate()
Original property name from the Odata EDM: WPEndDate
Provides the planning horizon. By default, the dates are taken from the assigned master project.
public String toString()
toString
in class VdmObject<WorkPackage>
public boolean equals(Object o)
equals
in class VdmObject<WorkPackage>
protected boolean canEqual(Object other)
canEqual
in class VdmObject<WorkPackage>
public int hashCode()
hashCode
in class VdmObject<WorkPackage>
Copyright © 2019 SAP SE. All rights reserved.