Class GcPreparedStatementCallback<T>
java.lang.Object
edu.internet2.middleware.grouperClient.jdbc.GcPreparedStatementCallback<T>
- Type Parameters:
T
- is the type of object that will be returned.
Object that gets a preparedStatement back from the connection and the sql - closing it is handled within the framework.
-
Constructor Summary
ConstructorDescriptionGcPreparedStatementCallback
(String _query) Create a callableStatement from the query given. -
Method Summary
Modifier and TypeMethodDescriptionabstract T
callback
(PreparedStatement preparedStatement) Get access to the database connection.getQuery()
-
Constructor Details
-
GcPreparedStatementCallback
Create a callableStatement from the query given.- Parameters:
_query
-
-
-
Method Details
-
getQuery
- Returns:
- the query
-
callback
Get access to the database connection. If no exceptions are thrown, the session will be automatically committed.
- Parameters:
preparedStatement
- is the connection access.- Returns:
- the correct type.
- Throws:
SQLException
- is thrown if things go wrong.
-