JPA Interface

ConnectionFunction

Type Parameters:
<C> - the connection type, usually {@code java.sql.Connection}

A function which makes use of a native database connection to compute a result. The connection is usually a JDBC connection.
See Also:
ConnectionConsumer
callWithConnection()
Since:
JPA 3.2

Public Methods

T apply(C connection)
Compute a result using the given connection.
Parameters:
connection - the connection to use
Return:
the result
Throws:
Exceptionif a problem occurs calling the connection, usually a {@code java.sql.SQLException}
Since:
JPA 3.2