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
ConstructorDescriptionJCoTransaction
(String destinationName, Supplier<RequestResultT> requestResultFactory) Deprecated.Constructs aJCoTransaction
for the givendestinationName
andrequestResultFactory
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
after()
Deprecated.This method gets called *in any case* after the transactional calls are done.void
before
(Destination destination, RequestT request) Deprecated.This method gets called before anything else gets called in theRemoteFunctionRequestExecutor
.void
commit
(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.Returns the results of the return parameters of the givenresult
.void
rollback
(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 aJCoTransaction
for the givendestinationName
andrequestResultFactory
.- Parameters:
destinationName
- Name of the destination to be used.requestResultFactory
- Provider to be used to create aRequestResultT
object.- Throws:
RemoteFunctionException
- If there was an error while getting the actual destination for the givendestinationName
.
-
-
Method Details
-
before
Deprecated.Description copied from interface:Transaction
This method gets called before anything else gets called in theRemoteFunctionRequestExecutor
.- Specified by:
before
in interfaceTransaction<RequestT extends AbstractRemoteFunctionRequest<RequestT,
RequestResultT>, RequestResultT extends AbstractRemoteFunctionRequestResult<RequestT, RequestResultT>> - Parameters:
destination
- TheDestination
of this call.request
- TheAbstractRemoteFunctionRequest
going to be executed.
-
execute
@Nonnull public RequestResultT execute(@Nonnull Destination destination, @Nonnull RequestT request) throws RemoteFunctionException Deprecated.Description copied from interface:Transaction
The actual logic to be executed.- Specified by:
execute
in interfaceTransaction<RequestT extends AbstractRemoteFunctionRequest<RequestT,
RequestResultT>, RequestResultT extends AbstractRemoteFunctionRequestResult<RequestT, RequestResultT>> - Parameters:
destination
- TheDestination
of this call.request
- TheAbstractRemoteFunctionRequest
going to execute.- Returns:
- The
AbstractRemoteFunctionRequestResult
created by the request. - Throws:
RemoteFunctionException
-
getReturnParameterResults
protected List<com.sap.cloud.sdk.s4hana.connectivity.rfc.AbstractRemoteFunctionRequestResult.Result> getReturnParameterResults(RequestResultT result) Deprecated.Returns the results of the return parameters of the givenresult
.- Parameters:
result
- The result to get the return parameter results from.- Returns:
- The results of the return parameters of the given
result
.
-
commit
public void commit(@Nonnull Destination destination, @Nonnull RequestT request) throws RequestExecutionException Deprecated.Description copied from interface:Transaction
IfTransaction.execute(Destination, AbstractRemoteFunctionRequest)
succeeded, this method is called to actually commit the changes.- Specified by:
commit
in interfaceTransaction<RequestT extends AbstractRemoteFunctionRequest<RequestT,
RequestResultT>, RequestResultT extends AbstractRemoteFunctionRequestResult<RequestT, RequestResultT>> - Parameters:
destination
- TheDestination
of this call.request
- TheAbstractRemoteFunctionRequest
that was executed.- Throws:
RequestExecutionException
- If an exception occurred during thecommit
implementation.
-
rollback
public void rollback(@Nonnull Destination destination, @Nonnull RequestT request) throws RequestSerializationException, RequestExecutionException Deprecated.Description copied from interface:Transaction
If there was a problem withTransaction.execute(Destination, AbstractRemoteFunctionRequest)
orTransaction.commit(Destination, AbstractRemoteFunctionRequest)
this method will get called to rollback any unwanted changes.- Specified by:
rollback
in interfaceTransaction<RequestT extends AbstractRemoteFunctionRequest<RequestT,
RequestResultT>, RequestResultT extends AbstractRemoteFunctionRequestResult<RequestT, RequestResultT>> - Parameters:
destination
- TheDestination
of this call.request
- TheAbstractRemoteFunctionRequest
that was executed.- Throws:
RequestExecutionException
- If an exception occurred during therollback
implementation.RequestSerializationException
-
after
Deprecated.Description copied from interface:Transaction
This method gets called *in any case* after the transactional calls are done.- Specified by:
after
in interfaceTransaction<RequestT extends AbstractRemoteFunctionRequest<RequestT,
RequestResultT>, RequestResultT extends AbstractRemoteFunctionRequestResult<RequestT, RequestResultT>> - Throws:
RemoteFunctionException
- If an exception occurred during theafter
implementation.
-