Class BatchFluentHelperBasic<FluentHelperBatchT extends FluentHelperServiceBatch<FluentHelperBatchT,FluentHelperBatchChangeSetT>,FluentHelperBatchChangeSetT extends FluentHelperBatchEndChangeSet<FluentHelperBatchT>>
java.lang.Object
com.sap.cloud.sdk.datamodel.odata.helper.batch.BatchFluentHelperBasic<FluentHelperBatchT,FluentHelperBatchChangeSetT>
- Type Parameters:
FluentHelperBatchT
- The fluent helper type.FluentHelperBatchChangeSetT
- The type of the changesets being managed in this OData batch request.
- All Implemented Interfaces:
FluentHelperServiceBatch<FluentHelperBatchT,
,FluentHelperBatchChangeSetT> FluentHelperServiceBatchExecute
public abstract class BatchFluentHelperBasic<FluentHelperBatchT extends FluentHelperServiceBatch<FluentHelperBatchT,FluentHelperBatchChangeSetT>,FluentHelperBatchChangeSetT extends FluentHelperBatchEndChangeSet<FluentHelperBatchT>>
extends Object
implements FluentHelperServiceBatch<FluentHelperBatchT,FluentHelperBatchChangeSetT>
Representation of any OData batch request as a fluent interface for managing changesets and
executing
them in a single query.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddChangeSet
(FluentHelperModification<?, ?>... modifications) Adds a single OData batch changeset that includes all of the given data modification requests.addReadOperations
(FluentHelperByKey<?, ?, ?>... readByKeyOperations) Add read-by-key request to the OData batch request builder.addReadOperations
(FluentHelperFunction<?, ?, ?>... functionOperations) Add function requests to the OData batch request builder.Only functions that use GET can be added.addReadOperations
(FluentHelperRead<?, ?, ?>... readOperations) Add read request to the OData batch request builder.executeRequest
(Destination destination) Executes the underlying batch query including the stored changeset operations.protected abstract String
Get the OData service endpoint path for the current OData batch request.protected abstract FluentHelperBatchT
getThis()
Method to safely return the current fluent helper instance upon public method calls.Translate this OData v2 batch request into a genericODataRequestBatch
.Deactivates the CSRF token retrieval for this OData request.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sap.cloud.sdk.datamodel.odata.helper.batch.FluentHelperServiceBatch
beginChangeSet
-
Constructor Details
-
BatchFluentHelperBasic
public BatchFluentHelperBasic()
-
-
Method Details
-
getServicePathForBatchRequest
Get the OData service endpoint path for the current OData batch request. Usually it can be found as static memberDEFAULT_SERVICE_PATH
in the service class.- Returns:
- The String representation of the OData service endpoint path.
-
getThis
Method to safely return the current fluent helper instance upon public method calls.- Returns:
- The current fluent helper instance.
-
executeRequest
Description copied from interface:FluentHelperServiceBatchExecute
Executes the underlying batch query including the stored changeset operations.- Specified by:
executeRequest
in interfaceFluentHelperServiceBatchExecute
- Parameters:
destination
- Destination object for resolving theHttpClient
when executing the underlying OData query.- Returns:
- A single result element, holding each changeset response.
-
toRequest
Translate this OData v2 batch request into a genericODataRequestBatch
.- Returns:
- A protocol agnostic OData batch request instance.
-
addReadOperations
@Nonnull public FluentHelperBatchT addReadOperations(@Nonnull FluentHelperRead<?, ?, ?>... readOperations) Description copied from interface:FluentHelperServiceBatch
Add read request to the OData batch request builder.- Specified by:
addReadOperations
in interfaceFluentHelperServiceBatch<FluentHelperBatchT extends FluentHelperServiceBatch<FluentHelperBatchT,
FluentHelperBatchChangeSetT>, FluentHelperBatchChangeSetT extends FluentHelperBatchEndChangeSet<FluentHelperBatchT>> - Parameters:
readOperations
- A var-arg array of read operations.- Returns:
- The current OData batch request instance.
-
addReadOperations
@Nonnull public FluentHelperBatchT addReadOperations(@Nonnull FluentHelperByKey<?, ?, ?>... readByKeyOperations) Description copied from interface:FluentHelperServiceBatch
Add read-by-key request to the OData batch request builder.- Specified by:
addReadOperations
in interfaceFluentHelperServiceBatch<FluentHelperBatchT extends FluentHelperServiceBatch<FluentHelperBatchT,
FluentHelperBatchChangeSetT>, FluentHelperBatchChangeSetT extends FluentHelperBatchEndChangeSet<FluentHelperBatchT>> - Parameters:
readByKeyOperations
- A var-arg array of read operations.- Returns:
- The current OData batch request instance.
-
addReadOperations
@Nonnull public FluentHelperBatchT addReadOperations(@Nonnull FluentHelperFunction<?, ?, ?>... functionOperations) Description copied from interface:FluentHelperServiceBatch
Add function requests to the OData batch request builder.Only functions that use GET can be added.- Specified by:
addReadOperations
in interfaceFluentHelperServiceBatch<FluentHelperBatchT extends FluentHelperServiceBatch<FluentHelperBatchT,
FluentHelperBatchChangeSetT>, FluentHelperBatchChangeSetT extends FluentHelperBatchEndChangeSet<FluentHelperBatchT>> - Parameters:
functionOperations
- A var-arg array of function operations.- Returns:
- The current OData batch request instance
-
addChangeSet
@Nonnull public FluentHelperBatchT addChangeSet(@Nonnull FluentHelperModification<?, ?>... modifications) Description copied from interface:FluentHelperServiceBatch
Adds a single OData batch changeset that includes all of the given data modification requests. All changesets will be evaluated independently from each other.- Specified by:
addChangeSet
in interfaceFluentHelperServiceBatch<FluentHelperBatchT extends FluentHelperServiceBatch<FluentHelperBatchT,
FluentHelperBatchChangeSetT>, FluentHelperBatchChangeSetT extends FluentHelperBatchEndChangeSet<FluentHelperBatchT>> - Parameters:
modifications
- The data modification requests to be performed as part of a single changeset.- Returns:
- The current OData batch request instance.
-
withoutCsrfToken
Deactivates the CSRF token retrieval for this OData request. This is useful if the server does not support or require CSRF tokens as part of the request.- Returns:
- The same builder
-