Class ODataRequestUpdate
java.lang.Object
com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestGeneric
com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestUpdate
- All Implemented Interfaces:
ODataRequestExecutable
The executable OData patch update request.
-
Field Summary
Fields inherited from class com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestGeneric
csrfTokenRetriever, resourcePath, servicePath
-
Constructor Summary
ConstructorDescriptionODataRequestUpdate
(String servicePath, ODataResourcePath entityPath, String serializedEntity, UpdateStrategy updateStrategy, String versionIdentifier, ODataProtocol protocol) Default constructor for OData Update requests.ODataRequestUpdate
(String servicePath, ODataResourcePath entityPath, org.apache.http.HttpEntity httpEntity, UpdateStrategy updateStrategy, String versionIdentifier, ODataProtocol protocol) Default constructor for OData Update requests.ODataRequestUpdate
(String servicePath, String entityName, ODataEntityKey entityKey, String serializedEntity, UpdateStrategy updateStrategy, String versionIdentifier, ODataProtocol protocol) Convenience constructor for OData update requests on entity collections directly. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
execute
(org.apache.http.client.HttpClient httpClient) Execute the OData request with the provided HttpClient reference.getRelativeUri
(UriEncodingStrategy strategy) Get the static request URI of the OData resource.Get the String representation of the update payload.TheUpdateStrategy
determines if the entity will be changed or replaced.int
hashCode()
void
setUpdateStrategy
(UpdateStrategy updateStrategy) TheUpdateStrategy
determines if the entity will be changed or replaced.Methods inherited from class com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestGeneric
addHeader, addHeaderIfAbsent, addListener, addQueryParameter, getHeaders, getListeners, getProtocol, getQueryParameters, getRelativeUri, getRequestQuery, getResourcePath, getServicePath, setCsrfTokenRetriever, setHeader, setHeader, tryExecute, tryExecuteWithCsrfToken
-
Constructor Details
-
ODataRequestUpdate
public ODataRequestUpdate(@Nonnull String servicePath, @Nonnull String entityName, @Nonnull ODataEntityKey entityKey, @Nonnull String serializedEntity, @Nonnull UpdateStrategy updateStrategy, @Nullable String versionIdentifier, @Nonnull ODataProtocol protocol) Convenience constructor for OData update requests on entity collections directly. For operations on nested entities useODataRequestUpdate(String, ODataResourcePath, String, UpdateStrategy, String, ODataProtocol)
.- Parameters:
servicePath
- The OData service path.entityName
- The OData entity name.entityKey
- The OData entity key.serializedEntity
- The serialized OData entity.updateStrategy
- The update strategy.versionIdentifier
- The entity version identifier.protocol
- The OData protocol to use.
-
ODataRequestUpdate
public ODataRequestUpdate(@Nonnull String servicePath, @Nonnull ODataResourcePath entityPath, @Nonnull String serializedEntity, @Nonnull UpdateStrategy updateStrategy, @Nullable String versionIdentifier, @Nonnull ODataProtocol protocol) Default constructor for OData Update requests.- Parameters:
servicePath
- The OData service path.entityPath
- TheODataResourcePath
that identifies the entity to update.serializedEntity
- The serialized OData entity.updateStrategy
- The update strategy.versionIdentifier
- The entity version identifier.protocol
- The OData protocol to use.
-
ODataRequestUpdate
public ODataRequestUpdate(@Nonnull String servicePath, @Nonnull ODataResourcePath entityPath, @Nonnull org.apache.http.HttpEntity httpEntity, @Nonnull UpdateStrategy updateStrategy, @Nullable String versionIdentifier, @Nonnull ODataProtocol protocol) Default constructor for OData Update requests.- Parameters:
servicePath
- The OData service path.entityPath
- TheODataResourcePath
that identifies the entity to update.httpEntity
- The Http entity.updateStrategy
- The update strategy.versionIdentifier
- The entity version identifier.protocol
- The OData protocol to use.
-
-
Method Details
-
getRelativeUri
Description copied from class:ODataRequestGeneric
Get the static request URI of the OData resource.- Specified by:
getRelativeUri
in classODataRequestGeneric
- Parameters:
strategy
- URI encoding strategy.- Returns:
- The String representation of the request URI.
-
execute
@Nonnull public ODataRequestResultGeneric execute(@Nonnull org.apache.http.client.HttpClient httpClient) Description copied from interface:ODataRequestExecutable
Execute the OData request with the provided HttpClient reference.- Parameters:
httpClient
- The HttpClient.- Returns:
- An OData request result.
-
getSerializedEntity
Get the String representation of the update payload.- Returns:
- The serialized entity.
-
getUpdateStrategy
TheUpdateStrategy
determines if the entity will be changed or replaced. -
getVersionIdentifier
-
equals
- Overrides:
equals
in classODataRequestGeneric
-
canEqual
- Overrides:
canEqual
in classODataRequestGeneric
-
hashCode
public int hashCode()- Overrides:
hashCode
in classODataRequestGeneric
-
setUpdateStrategy
TheUpdateStrategy
determines if the entity will be changed or replaced.
-