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 Detail

      • inTransaction

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