java.lang.Object
com.sap.cloud.sdk.datamodel.odata.helper.VdmObject<EntityT>
com.sap.cloud.sdk.datamodel.odata.helper.VdmEntity<Incident>
com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.ehsincidentcreate.Incident

public class Incident extends VdmEntity<Incident>
Incident

Original entity name from the Odata EDM: Incident

  • Field Details

    • ALL_FIELDS

      public static final IncidentSelectable ALL_FIELDS
      Selector for all available fields of Incident.
    • INCIDENT_ID

      public static final IncidentField<String> INCIDENT_ID
      Use with available fluent helpers to apply the IncidentID field to query operations.
    • FILTER_BY_CURRENT_USER

      public static final IncidentField<Boolean> FILTER_BY_CURRENT_USER
      Use with available fluent helpers to apply the FilterByCurrentUser field to query operations.
    • INCIDENT_UUID

      public static final IncidentField<UUID> INCIDENT_UUID
      Use with available fluent helpers to apply the IncidentUUID field to query operations.
    • INCIDENT_UTC_DATE_TIME

      public static final IncidentField<ZonedDateTime> INCIDENT_UTC_DATE_TIME
      Use with available fluent helpers to apply the IncidentUTCDateTime field to query operations.
    • INCIDENT_TITLE

      public static final IncidentField<String> INCIDENT_TITLE
      Use with available fluent helpers to apply the IncidentTitle field to query operations.
    • INCIDENT_STATUS

      public static final IncidentField<String> INCIDENT_STATUS
      Use with available fluent helpers to apply the IncidentStatus field to query operations.
    • INCIDENT_LOCATION_DESCRIPTION

      public static final IncidentField<String> INCIDENT_LOCATION_DESCRIPTION
      Use with available fluent helpers to apply the IncidentLocationDescription field to query operations.
    • INCIDENT_DESCRIPTION_OF_EVENTS

      public static final IncidentField<String> INCIDENT_DESCRIPTION_OF_EVENTS
      Use with available fluent helpers to apply the IncidentDescriptionOfEvents field to query operations.
    • INCIDENT_CATEGORY

      public static final IncidentField<String> INCIDENT_CATEGORY
      Use with available fluent helpers to apply the IncidentCategory field to query operations.
    • EHS_LOCATION_UUID

      public static final IncidentField<UUID> EHS_LOCATION_UUID
      Use with available fluent helpers to apply the EHSLocationUUID field to query operations.
    • TO_LOCATION

      public static final IncidentOneToOneLink<Location> TO_LOCATION
      Use with available fluent helpers to apply the to_Location navigation property to query operations.
    • TO_PERSONS

      public static final IncidentLink<Person> TO_PERSONS
      Use with available fluent helpers to apply the to_Persons navigation property to query operations.
    • TO_ATTACHMENTS

      public static final IncidentLink<Attachment> TO_ATTACHMENTS
      Use with available fluent helpers to apply the to_Attachments navigation property to query operations.
  • Constructor Details

    • Incident

      public Incident()
    • Incident

      public Incident(@Nullable String incidentID, @Nullable Boolean filterByCurrentUser, @Nullable UUID incidentUUID, @Nullable ZonedDateTime incidentUTCDateTime, @Nullable String incidentTitle, @Nullable String incidentStatus, @Nullable String incidentLocationDescription, @Nullable String incidentDescriptionOfEvents, @Nullable String incidentCategory, @Nullable UUID eHSLocationUUID, @Nullable Location toLocation, List<Person> toPersons, List<Attachment> toAttachments)
  • Method Details

    • getType

      @Nonnull public Class<Incident> getType()
      Specified by:
      getType in class VdmObject<Incident>
    • setIncidentID

      public void setIncidentID(@Nullable String incidentID)
      Constraints: Not nullable, Maximum length: 20

      Original property name from the Odata EDM: IncidentID

      Parameters:
      incidentID - Incident ID
    • setFilterByCurrentUser

      public void setFilterByCurrentUser(@Nullable Boolean filterByCurrentUser)
      Constraints: none

      Original property name from the Odata EDM: FilterByCurrentUser

      Parameters:
      filterByCurrentUser - Filter by Current User
    • setIncidentUUID

      public void setIncidentUUID(@Nullable UUID incidentUUID)
      (Key Field) Constraints: Not nullable

      Original property name from the Odata EDM: IncidentUUID

      Parameters:
      incidentUUID - Incident Global Identification
    • setIncidentUTCDateTime

      public void setIncidentUTCDateTime(@Nullable ZonedDateTime incidentUTCDateTime)
      Constraints: Not nullable, Precision: 0

      Original property name from the Odata EDM: IncidentUTCDateTime

      Parameters:
      incidentUTCDateTime - Incident Start Date/Time (UTC)
    • setIncidentTitle

      public void setIncidentTitle(@Nullable String incidentTitle)
      Constraints: Not nullable, Maximum length: 255

      Original property name from the Odata EDM: IncidentTitle

      Parameters:
      incidentTitle - Incident Title
    • setIncidentStatus

      public void setIncidentStatus(@Nullable String incidentStatus)
      Constraints: Not nullable, Maximum length: 40

      Original property name from the Odata EDM: IncidentStatus

      Parameters:
      incidentStatus - Incident Status
    • setIncidentLocationDescription

      public void setIncidentLocationDescription(@Nullable String incidentLocationDescription)
      Constraints: Not nullable, Maximum length: 80

      Original property name from the Odata EDM: IncidentLocationDescription

      Parameters:
      incidentLocationDescription - Additional Description of Incident Location
    • setIncidentDescriptionOfEvents

      public void setIncidentDescriptionOfEvents(@Nullable String incidentDescriptionOfEvents)
      Constraints: Not nullable, Maximum length: 999999

      Original property name from the Odata EDM: IncidentDescriptionOfEvents

      Parameters:
      incidentDescriptionOfEvents - Description
    • setIncidentCategory

      public void setIncidentCategory(@Nullable String incidentCategory)
      Constraints: Not nullable, Maximum length: 3

      Original property name from the Odata EDM: IncidentCategory

      Parameters:
      incidentCategory - Incident Category
    • setEHSLocationUUID

      public void setEHSLocationUUID(@Nullable UUID eHSLocationUUID)
      Constraints: none

      Original property name from the Odata EDM: EHSLocationUUID

      Parameters:
      eHSLocationUUID - Location Global Identification
    • getEntityCollection

      protected String getEntityCollection()
      Specified by:
      getEntityCollection in class VdmEntity<Incident>
    • getKey

      @Nonnull protected Map<String,Object> getKey()
      Overrides:
      getKey in class VdmObject<Incident>
    • toMapOfFields

      @Nonnull protected Map<String,Object> toMapOfFields()
      Overrides:
      toMapOfFields in class VdmObject<Incident>
    • fromMap

      protected void fromMap(Map<String,Object> inputValues)
      Overrides:
      fromMap in class VdmObject<Incident>
    • field

      @Nonnull public static <T> IncidentField<T> field(@Nonnull String fieldName, @Nonnull Class<T> fieldType)
      Use with available fluent helpers to apply an extension field to query operations.
      Type Parameters:
      T - The type of the extension field when performing value comparisons.
      Parameters:
      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.
      Returns:
      A representation of an extension field from this entity.
    • field

      @Nonnull public static <T, DomainT> IncidentField<T> field(@Nonnull String fieldName, @Nonnull TypeConverter<T,DomainT> typeConverter)
      Use with available fluent helpers to apply an extension field to query operations.
      Type Parameters:
      T - The type of the extension field when performing value comparisons.
      DomainT - The type of the extension field as returned by the OData service.
      Parameters:
      typeConverter - A TypeConverter<T, DomainT> instance whose first generic type matches the Java type of the field
      fieldName - The name of the extension field as returned by the OData service.
      Returns:
      A representation of an extension field from this entity, holding a reference to the given TypeConverter.
    • getDestinationForFetch

      @Nullable public HttpDestinationProperties getDestinationForFetch()
      Overrides:
      getDestinationForFetch in class VdmEntity<Incident>
    • setServicePathForFetch

      protected void setServicePathForFetch(@Nullable String servicePathForFetch)
      Overrides:
      setServicePathForFetch in class VdmEntity<Incident>
    • attachToService

      public void attachToService(@Nullable String servicePath, @Nonnull HttpDestinationProperties destination)
      Overrides:
      attachToService in class VdmEntity<Incident>
    • getDefaultServicePath

      protected String getDefaultServicePath()
      Overrides:
      getDefaultServicePath in class VdmEntity<Incident>
    • toMapOfNavigationProperties

      @Nonnull protected Map<String,Object> toMapOfNavigationProperties()
      Overrides:
      toMapOfNavigationProperties in class VdmObject<Incident>
    • fetchLocation

      @Nullable public Location fetchLocation()
      Fetches the Location entity (one to one) associated with this entity. This corresponds to the OData navigation property to_Location.

      Please note: This method will not cache or persist the query results.

      Returns:
      The single associated Location entity, or null if an entity is not associated.
      Throws:
      com.sap.cloud.sdk.datamodel.odata.client.exception.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.
    • getLocationOrFetch

      @Nullable public Location getLocationOrFetch()
      Retrieval of associated Location entity (one to one). This corresponds to the OData navigation property to_Location.

      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.

      Returns:
      List of associated Location entity.
      Throws:
      com.sap.cloud.sdk.datamodel.odata.client.exception.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.
    • getLocationIfPresent

      @Nonnull public io.vavr.control.Option<Location> getLocationIfPresent()
      Retrieval of associated Location entity (one to one). This corresponds to the OData navigation property to_Location.

      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.

      Returns:
      If the information for navigation property to_Location is already loaded, the result will contain the Location entity. If not, an Option with result state empty is returned.
    • setLocation

      public void setLocation(Location value)
      Overwrites the associated Location entity for the loaded navigation property to_Location.
      Parameters:
      value - New Location entity.
    • fetchPersons

      @Nonnull public List<Person> fetchPersons()
      Fetches the Person entities (one to many) associated with this entity. This corresponds to the OData navigation property to_Persons.

      Please note: This method will not cache or persist the query results.

      Returns:
      List containing one or more associated Person entities. If no entities are associated then an empty list is returned.
      Throws:
      com.sap.cloud.sdk.datamodel.odata.client.exception.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.
    • getPersonsOrFetch

      @Nonnull public List<Person> getPersonsOrFetch()
      Retrieval of associated Person entities (one to many). This corresponds to the OData navigation property to_Persons.

      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.

      Returns:
      List of associated Person entities.
      Throws:
      com.sap.cloud.sdk.datamodel.odata.client.exception.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.
    • getPersonsIfPresent

      @Nonnull public io.vavr.control.Option<List<Person>> getPersonsIfPresent()
      Retrieval of associated Person entities (one to many). This corresponds to the OData navigation property to_Persons.

      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.

      Returns:
      If the information for navigation property to_Persons is already loaded, the result will contain the Person entities. If not, an Option with result state empty is returned.
    • setPersons

      public void setPersons(@Nonnull List<Person> value)
      Overwrites the list of associated Person entities for the loaded navigation property to_Persons.

      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.

      Parameters:
      value - List of Person entities.
    • addPersons

      public void addPersons(Person... entity)
      Adds elements to the list of associated Person entities. This corresponds to the OData navigation property to_Persons.

      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.

      Parameters:
      entity - Array of Person entities.
    • fetchAttachments

      @Nonnull public List<Attachment> fetchAttachments()
      Fetches the Attachment entities (one to many) associated with this entity. This corresponds to the OData navigation property to_Attachments.

      Please note: This method will not cache or persist the query results.

      Returns:
      List containing one or more associated Attachment entities. If no entities are associated then an empty list is returned.
      Throws:
      com.sap.cloud.sdk.datamodel.odata.client.exception.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.
    • getAttachmentsOrFetch

      @Nonnull public List<Attachment> getAttachmentsOrFetch()
      Retrieval of associated Attachment entities (one to many). This corresponds to the OData navigation property to_Attachments.

      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.

      Returns:
      List of associated Attachment entities.
      Throws:
      com.sap.cloud.sdk.datamodel.odata.client.exception.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.
    • getAttachmentsIfPresent

      @Nonnull public io.vavr.control.Option<List<Attachment>> getAttachmentsIfPresent()
      Retrieval of associated Attachment entities (one to many). This corresponds to the OData navigation property to_Attachments.

      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.

      Returns:
      If the information for navigation property to_Attachments is already loaded, the result will contain the Attachment entities. If not, an Option with result state empty is returned.
    • setAttachments

      public void setAttachments(@Nonnull List<Attachment> value)
      Overwrites the list of associated Attachment entities for the loaded navigation property to_Attachments.

      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.

      Parameters:
      value - List of Attachment entities.
    • addAttachments

      public void addAttachments(Attachment... entity)
      Adds elements to the list of associated Attachment entities. This corresponds to the OData navigation property to_Attachments.

      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.

      Parameters:
      entity - Array of Attachment entities.
    • builder

      @Nonnull public static Incident.IncidentBuilder builder()
    • getIncidentID

      @Nullable public String getIncidentID()
      Constraints: Not nullable, Maximum length: 20

      Original property name from the Odata EDM: IncidentID

      Returns:
      Incident ID
    • getFilterByCurrentUser

      @Nullable public Boolean getFilterByCurrentUser()
      Constraints: none

      Original property name from the Odata EDM: FilterByCurrentUser

      Returns:
      Filter by Current User
    • getIncidentUUID

      @Nullable public UUID getIncidentUUID()
      (Key Field) Constraints: Not nullable

      Original property name from the Odata EDM: IncidentUUID

      Returns:
      Incident Global Identification
    • getIncidentUTCDateTime

      @Nullable public ZonedDateTime getIncidentUTCDateTime()
      Constraints: Not nullable, Precision: 0

      Original property name from the Odata EDM: IncidentUTCDateTime

      Returns:
      Incident Start Date/Time (UTC)
    • getIncidentTitle

      @Nullable public String getIncidentTitle()
      Constraints: Not nullable, Maximum length: 255

      Original property name from the Odata EDM: IncidentTitle

      Returns:
      Incident Title
    • getIncidentStatus

      @Nullable public String getIncidentStatus()
      Constraints: Not nullable, Maximum length: 40

      Original property name from the Odata EDM: IncidentStatus

      Returns:
      Incident Status
    • getIncidentLocationDescription

      @Nullable public String getIncidentLocationDescription()
      Constraints: Not nullable, Maximum length: 80

      Original property name from the Odata EDM: IncidentLocationDescription

      Returns:
      Additional Description of Incident Location
    • getIncidentDescriptionOfEvents

      @Nullable public String getIncidentDescriptionOfEvents()
      Constraints: Not nullable, Maximum length: 999999

      Original property name from the Odata EDM: IncidentDescriptionOfEvents

      Returns:
      Description
    • getIncidentCategory

      @Nullable public String getIncidentCategory()
      Constraints: Not nullable, Maximum length: 3

      Original property name from the Odata EDM: IncidentCategory

      Returns:
      Incident Category
    • getEHSLocationUUID

      @Nullable public UUID getEHSLocationUUID()
      Constraints: none

      Original property name from the Odata EDM: EHSLocationUUID

      Returns:
      Location Global Identification
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class VdmObject<Incident>
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class VdmEntity<Incident>
    • canEqual

      protected boolean canEqual(@Nullable Object other)
      Overrides:
      canEqual in class VdmEntity<Incident>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class VdmEntity<Incident>