-
- Type Parameters:
C
- the connection type, usuallyjava.sql.Connection
- 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 ConnectionConsumer<C>
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
accept(C connection)
Execute the action using the given connection.
-
-
-
Method Detail
-
accept
void accept(C connection) throws java.lang.Exception
Execute the action using the given connection.- Parameters:
connection
- the connection to use- Throws:
java.lang.Exception
- if a problem occurs calling the connection, usually ajava.sql.SQLException
-
-