edu.internet2.middleware.grouperClient.jdbc
Class GcCallableStatementCallback<T>
java.lang.Object
edu.internet2.middleware.grouperClient.jdbc.GcCallableStatementCallback<T>
- Type Parameters:
T
- is the type of object that will be returned.
public abstract class GcCallableStatementCallback<T>
- extends java.lang.Object
Object that gets a callableStatement back from the connection and the sql - closing it is handled within the framework.
- Author:
- harveycg
Method Summary |
abstract T |
callback(java.sql.CallableStatement callableStatement)
Get access to the database connection. |
java.lang.String |
getQuery()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GcCallableStatementCallback
public GcCallableStatementCallback(java.lang.String _query)
- Create a callableStatement from the query given.
- Parameters:
_query
-
getQuery
public java.lang.String getQuery()
- Returns:
- the query
callback
public abstract T callback(java.sql.CallableStatement callableStatement)
throws java.sql.SQLException
Get access to the database connection. If no exception are thrown, the session will be automatically committed.
- Parameters:
callableStatement
- is the connection access.
- Returns:
- the correct type.
- Throws:
java.sql.SQLException
- is thrown if things go wrong.