Jakarta Persistence (JPA) Interface

jakarta.persistence.ConnectionConsumer<C>

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

An executable action which makes use of a native database connection. The connection is usually a JDBC connection.
See Also:
Since:
Jakarta Persistence (JPA) 3.2

Public Instance Methods

void accept(C connection)
Execute the action using the given connection.
Parameters:
connection - the connection to use
Throws:
Exception - if a problem occurs calling the connection, usually a java.sql.SQLException.
Since:
Jakarta Persistence (JPA) 1.0