FluentHelperBatchT
- The fluent helper type of the associated OData batch request.ThisT
- The current type of the implementing fluent helper instance.public abstract class BatchChangeSetFluentHelperBasic<FluentHelperBatchT extends FluentHelperServiceBatch<?,?>,ThisT> extends Object implements FluentHelperBatchEndChangeSet<FluentHelperBatchT>
Constructor and Description |
---|
BatchChangeSetFluentHelperBasic(FluentHelperBatchT typedBatchFluentHelper,
BatchFluentHelperBasic<?,?> basicBatchFluentHelper) |
Modifier and Type | Method and Description |
---|---|
ThisT |
addFunctionImport(FluentHelperFunction<?,?,?> functionImport)
Adds a function import call to the currently opened changeset.
|
protected ThisT |
addRequest(FluentHelperCreate<?,?> createRequest)
Adds a create operation to the current changeset request.
|
protected ThisT |
addRequest(FluentHelperDelete<?,?> deleteRequest)
Adds a delete operation to the current changeset request.
|
protected ThisT |
addRequest(FluentHelperUpdate<?,?> updateRequest)
Adds an update operation to the current changeset request.
|
protected <EntityT extends VdmEntity<EntityT>> |
addRequestCreate(Function<EntityT,FluentHelperCreate<?,EntityT>> serviceMethod,
EntityT entity)
Add a create operation to the current changeset request.
|
protected <EntityT extends VdmEntity<EntityT>> |
addRequestDelete(Function<EntityT,FluentHelperDelete<?,EntityT>> serviceMethod,
EntityT entity)
Add a delete operation to the current changeset request.
|
protected <EntityT extends VdmEntity<EntityT>> |
addRequestUpdate(Function<EntityT,FluentHelperUpdate<?,EntityT>> serviceMethod,
EntityT entity)
Add an update operation to the current changeset request.
|
FluentHelperBatchT |
endChangeSet()
Finish the definition of a single changeset and return to the parent OData batch request instance.
|
protected abstract ThisT |
getThis()
Method to safely return the current fluent helper instance upon public method calls.
|
public BatchChangeSetFluentHelperBasic(FluentHelperBatchT typedBatchFluentHelper, BatchFluentHelperBasic<?,?> basicBatchFluentHelper)
@Nonnull protected abstract ThisT getThis()
@Nonnull protected <EntityT extends VdmEntity<EntityT>> ThisT addRequestDelete(Function<EntityT,FluentHelperDelete<?,EntityT>> serviceMethod, EntityT entity)
EntityT
- The entity type to guarantee type safety.serviceMethod
- The method of a delete fluent helper from the given service class.entity
- The entity instance to be deleted.@Nonnull protected ThisT addRequest(@Nonnull FluentHelperDelete<?,?> deleteRequest)
deleteRequest
- The FluentHelperDelete
that represents the delete operation.@Nonnull protected <EntityT extends VdmEntity<EntityT>> ThisT addRequestCreate(Function<EntityT,FluentHelperCreate<?,EntityT>> serviceMethod, EntityT entity)
EntityT
- The entity type to guarantee type safety.serviceMethod
- The method of a create fluent helper from the given service class.entity
- The entity instance to be created.@Nonnull protected ThisT addRequest(@Nonnull FluentHelperCreate<?,?> createRequest)
createRequest
- The FluentHelperCreate
that represents the create operation.@Nonnull protected <EntityT extends VdmEntity<EntityT>> ThisT addRequestUpdate(Function<EntityT,FluentHelperUpdate<?,EntityT>> serviceMethod, EntityT entity)
EntityT
- The entity type to guarantee type safety.serviceMethod
- The method of an update fluent helper from the given service class.entity
- The entity instance to be updated.@Nonnull protected ThisT addRequest(@Nonnull FluentHelperUpdate<?,?> updateRequest)
updateRequest
- The FluentHelperUpdate
that represents the update operation.@Nonnull public FluentHelperBatchT endChangeSet()
endChangeSet
in interface FluentHelperBatchEndChangeSet<FluentHelperBatchT extends FluentHelperServiceBatch<?,?>>
@Nonnull public ThisT addFunctionImport(@Nonnull FluentHelperFunction<?,?,?> functionImport)
executeRequest
to issue the batch
request.functionImport
- The FluentHelperFunction
that represents the function import callIllegalStateException
- If the batch request contains a function import call within a change set which uses the HTTP GET
method.Copyright © 2021 SAP SE. All rights reserved.