Top Description Methods
jakarta.persistence

public Interface ConnectionConsumer<C>

Annotations
@FunctionalInterface
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.
Since
3.2
See Also
ConnectionFunction, EntityManager#runWithConnection(ConnectionConsumer)

Method Summary

Modifier and TypeMethod and Description
public void
accept(C
the connection to use
connection
)

Execute the action using the given connection.

Method Detail

acceptback to summary
public void accept(C connection) throws Exception

Execute the action using the given connection.

Parameters
connection:C

the connection to use

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