Class ODataRequestCreate
java.lang.Object
com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestGeneric
com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestCreate
- All Implemented Interfaces:
ODataRequestExecutable
The executable OData create request.
-
Field Summary
Fields inherited from class com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestGeneric
csrfTokenRetriever, resourcePath, servicePath
-
Constructor Summary
ConstructorDescriptionODataRequestCreate
(String servicePath, ODataResourcePath entityPath, String serializedEntity, ODataProtocol protocol) Default constructor for OData Create request.ODataRequestCreate
(String servicePath, String entityName, String serializedEntity, ODataProtocol protocol) Convenience constructor for OData delete 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.int
hashCode()
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
-
ODataRequestCreate
public ODataRequestCreate(@Nonnull String servicePath, @Nonnull String entityName, @Nonnull String serializedEntity, @Nonnull ODataProtocol protocol) Convenience constructor for OData delete requests on entity collections directly. For operations on nested entities useODataRequestCreate(String, ODataResourcePath, String, ODataProtocol)
.- Parameters:
servicePath
- The OData service path.entityName
- The OData entity name.serializedEntity
- The serialized query payload.protocol
- The OData protocol to use.
-
ODataRequestCreate
public ODataRequestCreate(@Nonnull String servicePath, @Nonnull ODataResourcePath entityPath, @Nonnull String serializedEntity, @Nonnull ODataProtocol protocol) Default constructor for OData Create request.- Parameters:
servicePath
- The OData service path.entityPath
- Thepath
to the OData entity.serializedEntity
- The serialized query payload.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
-
equals
- Overrides:
equals
in classODataRequestGeneric
-
canEqual
- Overrides:
canEqual
in classODataRequestGeneric
-
hashCode
public int hashCode()- Overrides:
hashCode
in classODataRequestGeneric
-