QueryT - The type of the query to execute.QueryResultT - The type of the result to return.public class SoapTransaction<QueryT extends AbstractRemoteFunctionQuery<QueryT,QueryResultT>,QueryResultT extends AbstractRemoteFunctionQueryResult<QueryT,QueryResultT>> extends Object implements Transaction<QueryT,QueryResultT>
Transaction interface to be used for SOAP queries.| Constructor and Description |
|---|
SoapTransaction(QuerySerializer<QueryT,QueryResultT> querySerializer,
HttpRequestExecutor<QueryT,QueryResultT> queryExecutorLogic,
HttpRequestExecutor<BapiQuery,BapiQueryResult> bapiQueryExecutorLogic) |
| 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
Transaction.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
Transaction.execute(ErpConfigContext, AbstractRemoteFunctionQuery) or
Transaction.commit(ErpConfigContext, AbstractRemoteFunctionQuery) this method will get called to rollback any
unwanted changes. |
public SoapTransaction(QuerySerializer<QueryT,QueryResultT> querySerializer, HttpRequestExecutor<QueryT,QueryResultT> queryExecutorLogic, HttpRequestExecutor<BapiQuery,BapiQueryResult> bapiQueryExecutorLogic)
public void before(@Nonnull ErpConfigContext configContext, @Nonnull QueryT query)
TransactionRemoteFunctionQueryExecutor.before in interface Transaction<QueryT extends AbstractRemoteFunctionQuery<QueryT,QueryResultT>,QueryResultT extends AbstractRemoteFunctionQueryResult<QueryT,QueryResultT>>configContext - The ErpConfigContext of this call.query - The AbstractRemoteFunctionQuery going to be executed.@Nonnull public QueryResultT execute(@Nonnull ErpConfigContext configContext, @Nonnull QueryT query) throws QueryExecutionException
Transactionexecute in interface Transaction<QueryT extends AbstractRemoteFunctionQuery<QueryT,QueryResultT>,QueryResultT extends AbstractRemoteFunctionQueryResult<QueryT,QueryResultT>>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.public void commit(@Nonnull ErpConfigContext configContext, @Nonnull QueryT query) throws QuerySerializationException, QueryExecutionException
TransactionTransaction.execute(ErpConfigContext, AbstractRemoteFunctionQuery) succeeded, this method is called to actually
commit the changes.commit in interface Transaction<QueryT extends AbstractRemoteFunctionQuery<QueryT,QueryResultT>,QueryResultT extends AbstractRemoteFunctionQueryResult<QueryT,QueryResultT>>configContext - The ErpConfigContext of this call.query - The AbstractRemoteFunctionQuery that was executed.QueryExecutionException - If an exception occurred during the commit implementation.QuerySerializationExceptionpublic void rollback(@Nonnull ErpConfigContext configContext, @Nonnull QueryT query) throws QuerySerializationException, QueryExecutionException
TransactionTransaction.execute(ErpConfigContext, AbstractRemoteFunctionQuery) or
Transaction.commit(ErpConfigContext, AbstractRemoteFunctionQuery) this method will get called to rollback any
unwanted changes.rollback in interface Transaction<QueryT extends AbstractRemoteFunctionQuery<QueryT,QueryResultT>,QueryResultT extends AbstractRemoteFunctionQueryResult<QueryT,QueryResultT>>configContext - The ErpConfigContext of this call.query - The AbstractRemoteFunctionQuery that was executed.QueryExecutionException - If an exception occurred during the rollback implementation.QuerySerializationExceptionpublic void after()
Transactionafter in interface Transaction<QueryT extends AbstractRemoteFunctionQuery<QueryT,QueryResultT>,QueryResultT extends AbstractRemoteFunctionQueryResult<QueryT,QueryResultT>>Copyright © 2020 SAP SE. All rights reserved.