public void execQuery(String sql,ExecQueryCallbackFunctionIF aListener) throws GenericEntityException {
  if (_connection == null) {
    getConnection();
  }
  try {
    if (Debug.verboseOn())     Debug.logVerbose("[SQLProcessor.execQuery]: " + sql,module);
    executeQuery(sql);
    boolean keepGoing=true;
    while (keepGoing && _rs.next()) {
      keepGoing=aListener.processNextRow(_rs);
    }
    if (_manualTX) {
      _connection.commit();
    }
  }
 catch (  SQLException sqle) {
    Debug.logWarning("[SQLProcessor.execQuery]: SQL Exception while executing the following:\n" + sql + "\nError was:",module);
    Debug.logWarning(sqle.getMessage(),module);
    throw new GenericEntityException("SQL Exception while executing the following:" + _sql,sqle);
  }
 finally {
    close();
  }
}

public void execQuery ( String sql , ExecQueryCallbackFunctionIF aListener ) throws GenericEntityException { if ( _connection == null ) { getConnection ( ) ; } try { if ( Debug . verboseOn ( ) ) Debug . logVerbose ( "[SQLProcessor.execQuery]: " + sql , module ) ; executeQuery ( sql ) ; boolean keepGoing = true ; while ( keepGoing && _rs . next ( ) ) { keepGoing = aListener . processNextRow ( _rs ) ; } if ( _manualTX ) { _connection . commit ( ) ; } } catch ( SQLException sqle ) { Debug . logWarning ( "[SQLProcessor.execQuery]: SQL Exception while executing the following:\n" + sql + "\nError was:" , module ) ; Debug . logWarning ( sqle . getMessage ( ) , module ) ; throw new GenericEntityException ( "SQL Exception while executing the following:" + _sql , sqle ) ; } finally { close ( ) ; } }
execute a query based on the sql string given . for each record of the resultset return , execute a callback function
