Interface TransactionCallback<T>

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface TransactionCallback<T>
    Callback for executing a block of code within a transaction.
    See Also:
    Database.withTransaction(TransactionCallback), VoidTransactionCallback
    • Method Detail

      • execute

        T execute​(@NotNull
                  @NotNull TransactionContext tx)
           throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • fromVoidCallback

        @NotNull
        static @NotNull TransactionCallback<java.lang.Void> fromVoidCallback​(@NotNull
                                                                             @NotNull VoidTransactionCallback callback)
        Converts VoidTransactionCallback to TransactionCallback<Void>