Top Description Methods
jakarta.persistence

public Interface ConnectionFunction<C, T>

Annotations
@FunctionalInterface
Type Parameters
<C>
the connection type, usually java.sql.Connection

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

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

the result
apply
(C
the connection to use
connection
)

Compute a result using the given connection.

Method Detail

applyback to summary
public T apply(C connection) throws Exception

Compute a result using the given connection.

Parameters
connection:C

the connection to use

Returns:T

the result

Exceptions
Exception:
if a problem occurs calling the connection, usually a java.sql.SQLException