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 WorkPackageLink<WorkPackageFunction> |
TO_WORK_PACKAGE_FUNCTION_SET
Use with available fluent helpers to apply the WorkPackageFunctionSet navigation property to query
operations.
|
static WorkPackageField<String> |
UNIT_ID
Use with available fluent helpers to apply the UnitId field to query operations.
|
static WorkPackageField<BigDecimal> |
UNIT_QUANTITY
Use with available fluent helpers to apply the UnitQuantity field 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<String> |
WORK_PACKAGE_TYPE
Use with available fluent helpers to apply the WorkPackageType 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 unitId,
BigDecimal unitQuantity,
String workPackageType,
String projectID,
String description,
String workPackageID,
String workPackageName,
LocalDateTime wPStartDate,
LocalDateTime wPEndDate,
List<WorkItem> toWorkItemSet,
List<Demand> toDemandSet,
List<WorkPackageFunction> toWorkPackageFunctionSet) |
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 |
addWorkPackageFunctionSet(WorkPackageFunction... entity)
Adds elements to the list of associated WorkPackageFunction entities.
|
void |
attachToService(String servicePath,
HttpDestinationProperties destination)
Sets the service path and destination 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.
|
List<WorkPackageFunction> |
fetchWorkPackageFunctionSet()
Fetches the WorkPackageFunction 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()
Used by fluent helpers and navigation property methods to construct OData queries.
|
io.vavr.control.Option<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
|
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 |
getProjectID()
(Key Field) Constraints: Not nullable, Maximum length: 40
|
Class<WorkPackage> |
getType() |
String |
getUnitId()
Constraints: Not nullable, Maximum length: 40
|
BigDecimal |
getUnitQuantity()
Constraints: Not nullable, Precision: 15, Scale: 3
|
io.vavr.control.Option<List<WorkItem>> |
getWorkItemSetIfPresent()
Retrieval of associated WorkItem entities (one to many).
|
List<WorkItem> |
getWorkItemSetOrFetch()
Retrieval of associated WorkItem entities (one to many).
|
io.vavr.control.Option<List<WorkPackageFunction>> |
getWorkPackageFunctionSetIfPresent()
Retrieval of associated WorkPackageFunction entities (one to many).
|
List<WorkPackageFunction> |
getWorkPackageFunctionSetOrFetch()
Retrieval of associated WorkPackageFunction entities (one to many).
|
String |
getWorkPackageID()
(Key Field) Constraints: Not nullable, Maximum length: 50
|
String |
getWorkPackageName()
(Key Field) Constraints: Not nullable, Maximum length: 60
|
String |
getWorkPackageType()
Constraints: Not nullable, Maximum length: 1
|
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 |
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 |
setUnitId(String unitId)
Constraints: Not nullable, Maximum length: 40
|
void |
setUnitQuantity(BigDecimal unitQuantity)
Constraints: Not nullable, Precision: 15, Scale: 3
|
void |
setWorkItemSet(List<WorkItem> value)
Overwrites the list of associated WorkItem entities for the loaded navigation property WorkItemSet.
|
void |
setWorkPackageFunctionSet(List<WorkPackageFunction> value)
Overwrites the list of associated WorkPackageFunction entities for the loaded navigation property
WorkPackageFunctionSet.
|
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 |
setWorkPackageType(String workPackageType)
Constraints: Not nullable, Maximum length: 1
|
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() |
getServicePathForFetch, getVersionIdentifier, setDestinationForFetch, 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> UNIT_ID
public static final WorkPackageField<BigDecimal> UNIT_QUANTITY
public static final WorkPackageField<String> WORK_PACKAGE_TYPE
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
public static final WorkPackageLink<WorkPackageFunction> TO_WORK_PACKAGE_FUNCTION_SET
public WorkPackage()
public WorkPackage(@Nullable String unitId, @Nullable BigDecimal unitQuantity, @Nullable String workPackageType, @Nullable String projectID, @Nullable String description, @Nullable String workPackageID, @Nullable String workPackageName, @Nullable LocalDateTime wPStartDate, @Nullable LocalDateTime wPEndDate, List<WorkItem> toWorkItemSet, List<Demand> toDemandSet, List<WorkPackageFunction> toWorkPackageFunctionSet)
@Nonnull public Class<WorkPackage> getType()
getType
in class VdmObject<WorkPackage>
public void setUnitId(@Nullable String unitId)
Original property name from the Odata EDM: UnitId
Resources correspond to individual entities in a project. You can assign multiple cost elements and activity types to each resource.
unitId
- Used to uniquely identify a resource.public void setUnitQuantity(@Nullable BigDecimal unitQuantity)
Original property name from the Odata EDM: UnitQuantity
unitQuantity
- Total quantity per period.public void setWorkPackageType(@Nullable String workPackageType)
Original property name from the Odata EDM: WorkPackageType
You can use the following values to indicate the type of service planned in the work package:' ' - Time based servicesU - Unit based services
workPackageType
- Indicates the type of service planned in a work package.public void setProjectID(@Nullable String projectID)
Original property name from the Odata EDM: ProjectID
projectID
- Identifies a customer or internal 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()
VdmEntity
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 HttpDestinationProperties getDestinationForFetch()
VdmEntity
getDestinationForFetch
in class VdmEntity<WorkPackage>
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<WorkPackage>
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<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.destination
- New destination to apply to this entity and any associated entities that were previously fetched.protected String getDefaultServicePath()
VdmEntity
getDefaultServicePath
in class VdmEntity<WorkPackage>
protocol://hostname:port
and the OData resource name (entity set, $metadata
, etc.)@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 io.vavr.control.Option<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 Option
result state will be empty
.
Option
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 io.vavr.control.Option<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 Option
result state will be empty
.
Option
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.@Nonnull public List<WorkPackageFunction> fetchWorkPackageFunctionSet() 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<WorkPackageFunction> getWorkPackageFunctionSetOrFetch() throws com.sap.cloud.sdk.odatav2.connectivity.ODataException
If the navigation property WorkPackageFunctionSet 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 io.vavr.control.Option<List<WorkPackageFunction>> getWorkPackageFunctionSetIfPresent()
If the navigation property for an entity WorkPackage 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 setWorkPackageFunctionSet(@Nonnull List<WorkPackageFunction> value)
If the navigation property WorkPackageFunctionSet 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 WorkPackageFunction entities.public void addWorkPackageFunctionSet(WorkPackageFunction... entity)
If the navigation property WorkPackageFunctionSet 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 WorkPackageFunction entities.public static WorkPackage.WorkPackageBuilder builder()
@Nullable public String getUnitId()
Original property name from the Odata EDM: UnitId
Resources correspond to individual entities in a project. You can assign multiple cost elements and activity types to each resource.
@Nullable public BigDecimal getUnitQuantity()
Original property name from the Odata EDM: UnitQuantity
@Nullable public String getWorkPackageType()
Original property name from the Odata EDM: WorkPackageType
You can use the following values to indicate the type of service planned in the work package:' ' - Time based servicesU - Unit based services
@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 © 2020 SAP SE. All rights reserved.