QueryT - The type of the query to execute.QueryResultT - The type of the result to return.public interface Transaction<QueryT extends AbstractRemoteFunctionQuery<QueryT,QueryResultT>,QueryResultT extends AbstractRemoteFunctionQueryResult<QueryT,QueryResultT>>
RemoteFunctionQueryExecutor.| Modifier and Type | Method and Description |
|---|---|
void |
after()
This method gets called *in any case* after the transactional calls are done.
|
void |
before(ErpConfigContext configContext,
QueryT query)
This method gets called before anything else gets called in the
RemoteFunctionQueryExecutor. |
void |
commit(ErpConfigContext configContext,
QueryT query)
If
execute(ErpConfigContext, AbstractRemoteFunctionQuery) succeeded, this method is called to actually
commit the changes. |
QueryResultT |
execute(ErpConfigContext configContext,
QueryT query)
The actual logic to be executed.
|
void |
rollback(ErpConfigContext configContext,
QueryT query)
If there was a problem with
execute(ErpConfigContext, AbstractRemoteFunctionQuery) or
commit(ErpConfigContext, AbstractRemoteFunctionQuery) this method will get called to rollback any
unwanted changes. |
void before(@Nonnull ErpConfigContext configContext, @Nonnull QueryT query)
RemoteFunctionQueryExecutor.configContext - The ErpConfigContext of this call.query - The AbstractRemoteFunctionQuery going to be executed.@Nonnull QueryResultT execute(@Nonnull ErpConfigContext configContext, @Nonnull QueryT query) throws QueryExecutionException
configContext - The ErpConfigContext of this call.query - The AbstractRemoteFunctionQuery going to execute.AbstractRemoteFunctionQueryResult created by the query.QueryExecutionException - if an exception occurred during the execute implementation.void commit(@Nonnull ErpConfigContext configContext, @Nonnull QueryT query) throws QueryExecutionException
execute(ErpConfigContext, AbstractRemoteFunctionQuery) succeeded, this method is called to actually
commit the changes.configContext - The ErpConfigContext of this call.query - The AbstractRemoteFunctionQuery that was executed.QueryExecutionException - If an exception occurred during the commit implementation.void rollback(@Nonnull ErpConfigContext configContext, @Nonnull QueryT query) throws QueryExecutionException
execute(ErpConfigContext, AbstractRemoteFunctionQuery) or
commit(ErpConfigContext, AbstractRemoteFunctionQuery) this method will get called to rollback any
unwanted changes.configContext - The ErpConfigContext of this call.query - The AbstractRemoteFunctionQuery that was executed.QueryExecutionException - If an exception occurred during the rollback implementation.void after()
throws RemoteFunctionException
RemoteFunctionException - If an exception occurred during the after implementation.Copyright © 2020 SAP SE. All rights reserved.