@FunctionalInterface
public interface ConnectionCallable<T>
Connection
.Modifier and Type | Method and Description |
---|---|
T |
run(java.sql.Connection connection)
Run statements.
|
T run(java.sql.Connection connection) throws java.lang.Exception
Implementations may freely use the argument Connection
to run
statements against the database. Implementations MUST manage the
lifecycle of any resources created from this connection
,
such as Statement
or ResultSet
. Implementations MUST NOT
manage the lifecycle of the Connection
, which is managed by the
ConnectionProvider
that provided the connection
to
this ConnectionCallable
.
connection
- The connection.java.lang.Exception
- Any exception, including SQLException
, that
will be propagated as an unchecked
DataAccessException
.Copyright © 2018. All Rights Reserved.