T
- public class InTransaction<T extends Serializable> extends BaseOperation<T>
Operation
in a transaction. Useful in combination with ApplyBatch
.Constructor and Description |
---|
InTransaction(Operation<T> toInvoke)
Creates a new instance of InTransaction that invokes the given
Operation inside a
new database transaction. |
Modifier and Type | Method and Description |
---|---|
void |
afterInvoke(Object result,
Connection connection)
This method will be called on the client side e.g.
|
T |
getResult()
This method will only yield a valid result after a call to invoke.
|
T |
invoke()
The method that will be called on the server side.
|
beforeInvoke, getClientToken, mapException
public InTransaction(Operation<T> toInvoke)
Operation
inside a
new database transaction.toInvoke
- The Operation
to invoke. Use ApplyBatch
as parameter to
apply a batch in a transaction.public T invoke() throws SaBasicException
Operation
SaBasicException
- exception when invoking this operationpublic void afterInvoke(Object result, Connection connection)
Operation
result
- The result of invoke obtained by the rmi-callCopyright © 2016 SAPERION AG. All rights reserved.