Package org.jooq

Interface ConnectionCallable<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 ConnectionCallable<T>
    An operation that can run code and statements against a provided JDBC Connection.
    Author:
    Lukas Eder
    • Method Detail

      • run

        T run​(java.sql.Connection connection)
        throws java.lang.Exception
        Run statements.

        Implementations may freely use the argument Connection to run statements against the database. Implementations MUST manage the lifecycle of any resources created from this connection, such as Statement or ResultSet. Implementations MUST NOT manage the lifecycle of the Connection, which is managed by the ConnectionProvider that provided the connection to this ConnectionCallable.

        Parameters:
        connection - The connection.
        Returns:
        The outcome of the callable.
        Throws:
        java.lang.Exception - Any exception, including SQLException, that will be propagated as an unchecked DataAccessException.