Interface TransactionalConsumer<T extends Transactional<T>,​X extends Exception>

  • Type Parameters:
    T - the SqlObject type to provide
    X - exception thrown

    public interface TransactionalConsumer<T extends Transactional<T>,​X extends Exception>
    Callback that expects an open transaction and returns no results.
    • Method Detail

      • useTransaction

        void useTransaction​(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.
        Throws:
        X - any exception thrown will cause the transaction to be rolled back
        X extends Exception