public class ODataUpdateRequestBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
ODataUpdateRequest |
build()
Builds an ODataUpdateRequest from this builder.
|
ODataUpdateRequestBuilder |
enableMetadataCache()
Use this API to disable metadata caching.
|
ODataUpdateRequestBuilder |
enableMetadataCache(com.sap.cloud.sdk.cloudplatform.cache.CacheKey cacheKey)
Enables caching of the metadata of an OData V2 data source.
|
ODataUpdateRequestBuilder |
withBody(Map<String,Object> entityData)
Deprecated.
|
ODataUpdateRequestBuilder |
withBodyAs(Object pojoData)
This method is used to create the request body based on a POJO object
|
ODataUpdateRequestBuilder |
withBodyAsMap(Map<String,Object> entityData)
Sets the passed map for the payload of an OData update request.
|
ODataUpdateRequestBuilder |
withCacheRefresh()
Replaces the existing metadata in the cache with the latest version from the OData V2 data source.
|
static ODataUpdateRequestBuilder |
withEntity(String serviceName,
String entitySetName,
Map<String,Object> keys)
Creates an ODataUpdateRequestBuilder with the given service and entity name.
|
ODataUpdateRequestBuilder |
withErrorHandler(ErrorResultHandler<?> errorHandler)
Sets an error handler to this ODataUpdateRequestBuilder.
|
ODataUpdateRequestBuilder |
withHeader(String key,
String value)
Adds a header to the update request.
|
ODataUpdateRequestBuilder |
withHeader(String key,
String value,
boolean passInAllRequests)
Adds a header to the update request and optionally to the metadata request as well depending on the value of the
passInAllRequests parameter.
|
ODataUpdateRequestBuilder |
withMetadata(URL metadataFilePath)
Enables caching of the metadata of an OData V2 data source.
|
public static ODataUpdateRequestBuilder withEntity(String serviceName, String entitySetName, Map<String,Object> keys)
serviceName - name of the odata service where the developer wants to execute an update operation.entitySetName - name of the entity set, on which the developer wants to execute an update operationkeys - keys identifying a particular entitypublic ODataUpdateRequestBuilder withHeader(String key, String value)
key - name of the headervalue - value of the headerpublic ODataUpdateRequestBuilder withHeader(String key, String value, boolean passInAllRequests)
key - name of the headervalue - value of the headerpassInAllRequests - boolean indicating whether the header is to be passed in all the requests to the backend like $metadata call, CSRF Token fetch etc. made as part of the Update Request call.@Deprecated public ODataUpdateRequestBuilder withBody(Map<String,Object> entityData)
public ODataUpdateRequestBuilder enableMetadataCache()
public ODataUpdateRequestBuilder enableMetadataCache(com.sap.cloud.sdk.cloudplatform.cache.CacheKey cacheKey)
public ODataUpdateRequestBuilder withCacheRefresh()
public ODataUpdateRequestBuilder withMetadata(URL metadataFilePath)
key - Cache key containing the ID of the tenant where the application runs. You can also include the user name in the cache key.public ODataUpdateRequestBuilder withBodyAsMap(Map<String,Object> entityData)
entityData - public ODataUpdateRequestBuilder withErrorHandler(ErrorResultHandler<?> errorHandler)
errorHandler - public ODataUpdateRequest build()
public ODataUpdateRequestBuilder withBodyAs(Object pojoData)
pojoData - - An instance of POJO classCopyright © 2020 SAP. All Rights Reserved.