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 |
---|---|
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.
|
void |
setResult(Object result)
setResult will be called on the client side to assign the result.
|
beforeInvoke, getClientToken
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 Exception
Operation
Exception
- exception when invoking this operationpublic void setResult(Object result)
Operation
result
- The result of invoke obtained by the rmi-callCopyright © 2016 SAPERION AG. All rights reserved.