Class ModificationResponse<EntityT extends VdmEntity<?>>
java.lang.Object
com.sap.cloud.sdk.datamodel.odatav4.core.ModificationResponse<EntityT>
- Type Parameters:
EntityT
- The generic entity type.
Generic OData service response wrapper for data modification requests.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Get an updated version of the entity.Access the original entity used to make the request.io.vavr.control.Option<EntityT>
Get the optional response entity parsed from the HTTP content.Get the response headers.int
Get the response status code.io.vavr.control.Option<String>
Get the version identifier present in the response headers, the identifier of the original entity or none, if neither exist.int
hashCode()
static <EntityT extends VdmEntity<?>>
ModificationResponse<EntityT>of
(ODataRequestResultGeneric result, EntityT originalRequestEntity) toString()
-
Method Details
-
getModifiedEntity
Get an updated version of the entity. If the service responded with an entity it is returned here. If the service didn't respond with an entity but send an @{code ETag} header, the entity is updated and returned. Otherwise a copy of the original, unmodified entity is returned.- Returns:
- The modified entity.
-
getResponseEntity
Get the optional response entity parsed from the HTTP content.- Returns:
- The parsed entity or none.
-
getRequestEntity
Access the original entity used to make the request.- Returns:
- The original entity object used to perform an OData request.
-
getResponseStatusCode
public int getResponseStatusCode()Get the response status code.- Returns:
- The integer representation of the HTTP status code.
-
getResponseHeaders
Get the response headers.- Returns:
- The headers of the HTTP status code.
-
getUpdatedVersionIdentifier
Get the version identifier present in the response headers, the identifier of the original entity or none, if neither exist.- Returns:
- An up to date version identifier or none.
-
equals
-
hashCode
public int hashCode() -
toString
-
of
@Nonnull public static <EntityT extends VdmEntity<?>> ModificationResponse<EntityT> of(@Nonnull ODataRequestResultGeneric result, @Nonnull EntityT originalRequestEntity)
-