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.

public abstract class GcPreparedStatementCallback<T> extends Object
Object that gets a preparedStatement back from the connection and the sql - closing it is handled within the framework.
  • Constructor Details

    • GcPreparedStatementCallback

      public GcPreparedStatementCallback(String _query)
      Create a callableStatement from the query given.
      Parameters:
      _query -
  • Method Details

    • getQuery

      public String getQuery()
      Returns:
      the query
    • callback

      public abstract T callback(PreparedStatement preparedStatement) throws SQLException
      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.