Class JCoTransaction<RequestT extends AbstractRemoteFunctionRequest<RequestT,RequestResultT>,RequestResultT extends AbstractRemoteFunctionRequestResult<RequestT,RequestResultT>>
java.lang.Object
com.sap.cloud.sdk.s4hana.connectivity.rfc.JCoTransaction<RequestT,RequestResultT>
- Type Parameters:
RequestT- The type of the request to execute.RequestResultT- The type of the result to return.
- All Implemented Interfaces:
Transaction<RequestT,RequestResultT>
@Deprecated
public class JCoTransaction<RequestT extends AbstractRemoteFunctionRequest<RequestT,RequestResultT>,RequestResultT extends AbstractRemoteFunctionRequestResult<RequestT,RequestResultT>>
extends Object
implements Transaction<RequestT,RequestResultT>
Deprecated.
This module will be discontinued, along with its classes and methods.
Implementation of the
Transaction interface to be used for JCo queries.-
Constructor Summary
ConstructorsConstructorDescriptionJCoTransaction(String destinationName, Supplier<RequestResultT> requestResultFactory) Deprecated.Constructs aJCoTransactionfor the givendestinationNameandrequestResultFactory. -
Method Summary
Modifier and TypeMethodDescriptionvoidafter()Deprecated.This method gets called *in any case* after the transactional calls are done.voidbefore(Destination destination, RequestT request) Deprecated.This method gets called before anything else gets called in theRemoteFunctionRequestExecutor.voidcommit(Destination destination, RequestT request) Deprecated.IfTransaction.execute(Destination, AbstractRemoteFunctionRequest)succeeded, this method is called to actually commit the changes.execute(Destination destination, RequestT request) Deprecated.The actual logic to be executed.protected List<com.sap.cloud.sdk.s4hana.connectivity.rfc.AbstractRemoteFunctionRequestResult.Result>Deprecated.voidrollback(Destination destination, RequestT request) Deprecated.If there was a problem withTransaction.execute(Destination, AbstractRemoteFunctionRequest)orTransaction.commit(Destination, AbstractRemoteFunctionRequest)this method will get called to rollback any unwanted changes.
-
Constructor Details
-
JCoTransaction
public JCoTransaction(@Nonnull String destinationName, @Nonnull Supplier<RequestResultT> requestResultFactory) throws RemoteFunctionException Deprecated.Constructs aJCoTransactionfor the givendestinationNameandrequestResultFactory.- Parameters:
destinationName- Name of the destination to be used.requestResultFactory- Provider to be used to create aRequestResultTobject.- Throws:
RemoteFunctionException- If there was an error while getting the actual destination for the givendestinationName.
-
-
Method Details
-
before
Deprecated.Description copied from interface:TransactionThis method gets called before anything else gets called in theRemoteFunctionRequestExecutor.- Specified by:
beforein interfaceTransaction<RequestT extends AbstractRemoteFunctionRequest<RequestT,RequestResultT>, RequestResultT extends AbstractRemoteFunctionRequestResult<RequestT, RequestResultT>> - Parameters:
destination- TheDestinationof this call.request- TheAbstractRemoteFunctionRequestgoing to be executed.
-
execute
@Nonnull public RequestResultT execute(@Nonnull Destination destination, @Nonnull RequestT request) throws RemoteFunctionException Deprecated.Description copied from interface:TransactionThe actual logic to be executed.- Specified by:
executein interfaceTransaction<RequestT extends AbstractRemoteFunctionRequest<RequestT,RequestResultT>, RequestResultT extends AbstractRemoteFunctionRequestResult<RequestT, RequestResultT>> - Parameters:
destination- TheDestinationof this call.request- TheAbstractRemoteFunctionRequestgoing to execute.- Returns:
- The
AbstractRemoteFunctionRequestResultcreated by the request. - Throws:
RemoteFunctionException
-
getReturnParameterResults
protected List<com.sap.cloud.sdk.s4hana.connectivity.rfc.AbstractRemoteFunctionRequestResult.Result> getReturnParameterResults(RequestResultT result) Deprecated. -
commit
public void commit(@Nonnull Destination destination, @Nonnull RequestT request) throws RequestExecutionException Deprecated.Description copied from interface:TransactionIfTransaction.execute(Destination, AbstractRemoteFunctionRequest)succeeded, this method is called to actually commit the changes.- Specified by:
commitin interfaceTransaction<RequestT extends AbstractRemoteFunctionRequest<RequestT,RequestResultT>, RequestResultT extends AbstractRemoteFunctionRequestResult<RequestT, RequestResultT>> - Parameters:
destination- TheDestinationof this call.request- TheAbstractRemoteFunctionRequestthat was executed.- Throws:
RequestExecutionException- If an exception occurred during thecommitimplementation.
-
rollback
public void rollback(@Nonnull Destination destination, @Nonnull RequestT request) throws RequestSerializationException, RequestExecutionException Deprecated.Description copied from interface:TransactionIf there was a problem withTransaction.execute(Destination, AbstractRemoteFunctionRequest)orTransaction.commit(Destination, AbstractRemoteFunctionRequest)this method will get called to rollback any unwanted changes.- Specified by:
rollbackin interfaceTransaction<RequestT extends AbstractRemoteFunctionRequest<RequestT,RequestResultT>, RequestResultT extends AbstractRemoteFunctionRequestResult<RequestT, RequestResultT>> - Parameters:
destination- TheDestinationof this call.request- TheAbstractRemoteFunctionRequestthat was executed.- Throws:
RequestExecutionException- If an exception occurred during therollbackimplementation.RequestSerializationException
-
after
Deprecated.Description copied from interface:TransactionThis method gets called *in any case* after the transactional calls are done.- Specified by:
afterin interfaceTransaction<RequestT extends AbstractRemoteFunctionRequest<RequestT,RequestResultT>, RequestResultT extends AbstractRemoteFunctionRequestResult<RequestT, RequestResultT>> - Throws:
RemoteFunctionException- If an exception occurred during theafterimplementation.
-