Interface TransactionalCallback<R,T extends Transactional<T>,X extends Exception>
- Type Parameters:
R- the result type producedT- the SqlObject type to provideX- exception thrown
public interface TransactionalCallback<R,T extends Transactional<T>,X extends Exception>
Callback that expects an open transaction and produces a result.
-
Method Summary
-
Method Details
-
inTransaction
Execute in a transaction. Will be committed afterwards, or rolled back if an exception is thrown.- Parameters:
transactional- The object communicating with the database.- Returns:
- the transaction result
- Throws:
X- any exception thrown will cause the transaction to be rolled back
-