Interface TransactionalCallback<R,T extends Transactional<T>,X extends Exception>

Type Parameters:
R - the result type produced
T - the SqlObject type to provide
X - 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

    Modifier and Type
    Method
    Description
    inTransaction(T transactional)
    Execute in a transaction.
  • Method Details

    • inTransaction

      R inTransaction(T transactional) throws X
      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