Modifier and Type | Class and Description |
---|---|
static class |
Incident.IncidentBuilder
Helper class to allow for fluent creation of Incident instances.
|
Modifier and Type | Field and Description |
---|---|
static IncidentSelectable |
ALL_FIELDS
Selector for all available fields of Incident.
|
static IncidentField<UUID> |
EHS_LOCATION_UUID
Use with available fluent helpers to apply the EHSLocationUUID field to query operations.
|
static IncidentField<String> |
INCIDENT_CATEGORY
Use with available fluent helpers to apply the IncidentCategory field to query operations.
|
static IncidentField<String> |
INCIDENT_LOCATION_DESCRIPTION
Use with available fluent helpers to apply the IncidentLocationDescription field to query operations.
|
static IncidentField<String> |
INCIDENT_STATUS
Use with available fluent helpers to apply the IncidentStatus field to query operations.
|
static IncidentField<String> |
INCIDENT_TITLE
Use with available fluent helpers to apply the IncidentTitle field to query operations.
|
static IncidentField<ZonedDateTime> |
INCIDENT_UTC_DATE_TIME
Use with available fluent helpers to apply the IncidentUTCDateTime field to query operations.
|
static IncidentField<UUID> |
INCIDENT_UUID
Use with available fluent helpers to apply the IncidentUUID field to query operations.
|
static IncidentLink<Attachment> |
TO_ATTACHMENTS
Use with available fluent helpers to apply the to_Attachments navigation property to query operations.
|
static IncidentOneToOneLink<Location> |
TO_LOCATION
Use with available fluent helpers to apply the to_Location navigation property to query operations.
|
static IncidentLink<Person> |
TO_PERSONS
Use with available fluent helpers to apply the to_Persons navigation property to query operations.
|
changedOriginalFields
Constructor and Description |
---|
Incident() |
Incident(UUID incidentUUID,
String incidentCategory,
String incidentStatus,
String incidentTitle,
ZonedDateTime incidentUTCDateTime,
String incidentLocationDescription,
UUID eHSLocationUUID,
List<Attachment> toAttachments,
Location toLocation,
List<Person> toPersons) |
Modifier and Type | Method and Description |
---|---|
void |
addAttachments(Attachment... entity)
Adds elements to the list of associated Attachment entities.
|
void |
addPersons(Person... entity)
Adds elements to the list of associated Person entities.
|
void |
attachToService(String servicePath,
HttpDestinationProperties destination)
Sets the service path and destination for the fetch commands of this entity.
|
static Incident.IncidentBuilder |
builder() |
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
List<Attachment> |
fetchAttachments()
Fetches the Attachment entities (one to many) associated with this entity.
|
Location |
fetchLocation()
Fetches the Location entity (one to one) associated with this entity.
|
List<Person> |
fetchPersons()
Fetches the Person entities (one to many) associated with this entity.
|
static <T> IncidentField<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) |
io.vavr.control.Option<List<Attachment>> |
getAttachmentsIfPresent()
Retrieval of associated Attachment entities (one to many).
|
List<Attachment> |
getAttachmentsOrFetch()
Retrieval of associated Attachment 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.
|
UUID |
getEHSLocationUUID()
Constraints: Not nullable
|
protected String |
getEntityCollection()
Used by fluent helpers and navigation property methods to construct OData queries.
|
String |
getIncidentCategory()
Constraints: Not nullable, Maximum length: 3
|
String |
getIncidentLocationDescription()
Constraints: Not nullable, Maximum length: 499999
|
String |
getIncidentStatus()
Constraints: Not nullable, Maximum length: 40
|
String |
getIncidentTitle()
Constraints: Not nullable, Maximum length: 80
|
ZonedDateTime |
getIncidentUTCDateTime()
Constraints: Not nullable, Precision: 0
|
UUID |
getIncidentUUID()
(Key Field) Constraints: Not nullable
|
protected Map<String,Object> |
getKey() |
io.vavr.control.Option<Location> |
getLocationIfPresent()
Retrieval of associated Location entity (one to one).
|
Location |
getLocationOrFetch()
Retrieval of associated Location entity (one to one).
|
io.vavr.control.Option<List<Person>> |
getPersonsIfPresent()
Retrieval of associated Person entities (one to many).
|
List<Person> |
getPersonsOrFetch()
Retrieval of associated Person entities (one to many).
|
Class<Incident> |
getType() |
int |
hashCode() |
void |
setAttachments(List<Attachment> value)
Overwrites the list of associated Attachment entities for the loaded navigation property
to_Attachments.
|
void |
setEHSLocationUUID(UUID eHSLocationUUID)
Constraints: Not nullable
|
void |
setIncidentCategory(String incidentCategory)
Constraints: Not nullable, Maximum length: 3
|
void |
setIncidentLocationDescription(String incidentLocationDescription)
Constraints: Not nullable, Maximum length: 499999
|
void |
setIncidentStatus(String incidentStatus)
Constraints: Not nullable, Maximum length: 40
|
void |
setIncidentTitle(String incidentTitle)
Constraints: Not nullable, Maximum length: 80
|
void |
setIncidentUTCDateTime(ZonedDateTime incidentUTCDateTime)
Constraints: Not nullable, Precision: 0
|
void |
setIncidentUUID(UUID incidentUUID)
(Key Field) Constraints: Not nullable
|
void |
setLocation(Location value)
Overwrites the associated Location entity for the loaded navigation property to_Location.
|
void |
setPersons(List<Person> value)
Overwrites the list of associated Person entities for the loaded navigation property to_Persons.
|
protected void |
setServicePathForFetch(String servicePathForFetch)
The service path only used for the fetch commands of this entity.
|
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 IncidentSelectable ALL_FIELDS
public static final IncidentField<UUID> INCIDENT_UUID
public static final IncidentField<String> INCIDENT_CATEGORY
public static final IncidentField<String> INCIDENT_STATUS
public static final IncidentField<String> INCIDENT_TITLE
public static final IncidentField<ZonedDateTime> INCIDENT_UTC_DATE_TIME
public static final IncidentField<String> INCIDENT_LOCATION_DESCRIPTION
public static final IncidentField<UUID> EHS_LOCATION_UUID
public static final IncidentLink<Attachment> TO_ATTACHMENTS
public static final IncidentOneToOneLink<Location> TO_LOCATION
public static final IncidentLink<Person> TO_PERSONS
public Incident()
public Incident(@Nullable UUID incidentUUID, @Nullable String incidentCategory, @Nullable String incidentStatus, @Nullable String incidentTitle, @Nullable ZonedDateTime incidentUTCDateTime, @Nullable String incidentLocationDescription, @Nullable UUID eHSLocationUUID, List<Attachment> toAttachments, @Nullable Location toLocation, List<Person> toPersons)
public void setIncidentUUID(@Nullable UUID incidentUUID)
Original property name from the Odata EDM: IncidentUUID
incidentUUID
- NodeIDpublic void setIncidentCategory(@Nullable String incidentCategory)
Original property name from the Odata EDM: IncidentCategory
IncidentNear MissSafety Observation
incidentCategory
- Classifies the incident. The following categories are used for an incident:public void setIncidentStatus(@Nullable String incidentStatus)
Original property name from the Odata EDM: IncidentStatus
After you enter or change information and choose the Save pushbutton, the system automatically assigns the appropriate status to the incident record. By choosing the Set Next Status pushbutton, you can choose to assign a status to the record.
incidentStatus
- Indicates the status of the incident record, for example, approved.public void setIncidentTitle(@Nullable String incidentTitle)
Original property name from the Odata EDM: IncidentTitle
You can use the title much like a label to distinguish quickly between records. When you search the data records in incident management, the title is often displayed together with the incident category, incident ID, and the short info (a composite of the injured person(s) and incident date).
incidentTitle
- Specifies the descriptive or general heading of an incident, a near miss, a safety observation, or an
incident of group deviation.public void setIncidentUTCDateTime(@Nullable ZonedDateTime incidentUTCDateTime)
Original property name from the Odata EDM: IncidentUTCDateTime
To standardize local times in a UTC time stamp and thus make them comparable with other times, these local times
need to be converted using your time zone and the ABAP command convert.Even if the system is able to determine
the time zone from Customizing or master data, you shoul save the time zone redundantly here.The internal
structure of the UTC time stamp is subdivided into a date part and a time part in packed number format
incidentUTCDateTime
- The UTC time stamp is the date and time relative to UTC (Universal Coordinated Time).public void setIncidentLocationDescription(@Nullable String incidentLocationDescription)
Original property name from the Odata EDM: IncidentLocationDescription
incidentLocationDescription
- Additional Location Descriptionpublic void setEHSLocationUUID(@Nullable UUID eHSLocationUUID)
Original property name from the Odata EDM: EHSLocationUUID
eHSLocationUUID
- Specifies the location.protected String getEntityCollection()
VdmEntity
getEntityCollection
in class VdmEntity<Incident>
@Nonnull protected Map<String,Object> toMapOfFields()
toMapOfFields
in class VdmObject<Incident>
@Nonnull public static <T> IncidentField<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> IncidentField<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<Incident>
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<Incident>
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<Incident>
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<Incident>
protocol://hostname:port
and the OData resource name (entity set, $metadata
, etc.)@Nonnull protected Map<String,Object> toMapOfNavigationProperties()
toMapOfNavigationProperties
in class VdmObject<Incident>
@Nonnull public List<Attachment> fetchAttachments() 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<Attachment> getAttachmentsOrFetch() throws com.sap.cloud.sdk.odatav2.connectivity.ODataException
If the navigation property to_Attachments of a queried Incident 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<Attachment>> getAttachmentsIfPresent()
If the navigation property for an entity Incident 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 setAttachments(@Nonnull List<Attachment> value)
If the navigation property to_Attachments of a queried Incident 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 Attachment entities.public void addAttachments(Attachment... entity)
If the navigation property to_Attachments of a queried Incident 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 Attachment entities.@Nullable public Location fetchLocation() throws com.sap.cloud.sdk.odatav2.connectivity.ODataException
Please note: This method will not cache or persist the query results.
null
if an entity is not associated.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.@Nullable public Location getLocationOrFetch() throws com.sap.cloud.sdk.odatav2.connectivity.ODataException
If the navigation property to_Location of a queried Incident 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<Location> getLocationIfPresent()
If the navigation property for an entity Incident 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 setLocation(Location value)
value
- New Location entity.@Nonnull public List<Person> fetchPersons() 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<Person> getPersonsOrFetch() throws com.sap.cloud.sdk.odatav2.connectivity.ODataException
If the navigation property to_Persons of a queried Incident 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<Person>> getPersonsIfPresent()
If the navigation property for an entity Incident 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 setPersons(@Nonnull List<Person> value)
If the navigation property to_Persons of a queried Incident 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 Person entities.public void addPersons(Person... entity)
If the navigation property to_Persons of a queried Incident 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 Person entities.public static Incident.IncidentBuilder builder()
@Nullable public UUID getIncidentUUID()
Original property name from the Odata EDM: IncidentUUID
@Nullable public String getIncidentCategory()
Original property name from the Odata EDM: IncidentCategory
IncidentNear MissSafety Observation
@Nullable public String getIncidentStatus()
Original property name from the Odata EDM: IncidentStatus
After you enter or change information and choose the Save pushbutton, the system automatically assigns the appropriate status to the incident record. By choosing the Set Next Status pushbutton, you can choose to assign a status to the record.
@Nullable public String getIncidentTitle()
Original property name from the Odata EDM: IncidentTitle
You can use the title much like a label to distinguish quickly between records. When you search the data records in incident management, the title is often displayed together with the incident category, incident ID, and the short info (a composite of the injured person(s) and incident date).
@Nullable public ZonedDateTime getIncidentUTCDateTime()
Original property name from the Odata EDM: IncidentUTCDateTime
To standardize local times in a UTC time stamp and thus make them comparable with other times, these local times
need to be converted using your time zone and the ABAP command convert.Even if the system is able to determine
the time zone from Customizing or master data, you shoul save the time zone redundantly here.The internal
structure of the UTC time stamp is subdivided into a date part and a time part in packed number format
@Nullable public String getIncidentLocationDescription()
Original property name from the Odata EDM: IncidentLocationDescription
@Nullable public UUID getEHSLocationUUID()
Original property name from the Odata EDM: EHSLocationUUID
Copyright © 2020 SAP SE. All rights reserved.