|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
DataEngineListeners register with SQLContext objects, and are alerted whenever that SQLContext is used in a DataEngine operation.
| Field Summary | |
static int |
SQL_EXECUTE
|
static int |
SQL_QUERY
|
static int |
SQL_UPDATE
|
| Method Summary | |
void |
exceptionOccurred(SQLContext context,
CMException cme,
int sqlOperation)
This method is invoked when a SQLContext object with which this listener is registered is used in a DataEngine operation which throws an exception. |
void |
executionCompleted(SQLContext context)
Invoked whenever a SQLContext to which this object is listening is used to execute a SQL statement. |
void |
queryCompleted(SQLContext context,
RowCollection rc)
This method is invoked when a SQLContext object with which this listener is registered is used in a DataEngine query. |
void |
updateCompleted(SQLContext context,
int updated)
Invoked whenever a SQLContext to which this object is listening is used to update a database. |
| Field Detail |
public static final int SQL_QUERY
public static final int SQL_UPDATE
public static final int SQL_EXECUTE
| Method Detail |
public void exceptionOccurred(SQLContext context,
CMException cme,
int sqlOperation)
context - The SQLContext with which this listener was registered. The connection which
was in use when the exception was thrown has been released; any future operations done with the
SQLContext object will take a (possible different) connection from the DatabaseManager.cme - The exception that was thrown.sqlOperation - The type of operation that caused the exception. This will be one of the
constants defined in the DataEngineListener interface.public void executionCompleted(SQLContext context)
context - The SQLContext with which this listener was registered. The connection which
was used in the statement is still contained in the SQLContext. If this connection was set in the
SQLContext with the setConnection() method, then it
needs to be freed (possibly in this method). If the connection was automatically retrieved from the
system alias (specified with the setSystemAlias() method),
then it is not necessary to free it.
public void queryCompleted(SQLContext context,
RowCollection rc)
background thread then this method will be invoked
before the getRows() method returns.
context - The SQLContext with which this listener was registered. If the connection was
specifically set in the SQLContext with the setConnection()
method, then it is still present in the SQLContext. Otherwise, the connection which ran the query has
already been returned to the pool.rc - The RowCollection resulting from the query.
public void updateCompleted(SQLContext context,
int updated)
context - The SQLContext with which this listener was registered. The connection which
was used in the statement is still contained in the SQLContext. If this connection was set in the
SQLContext with the setConnection() method, then it
needs to be freed (possibly in this method). If the connection was automatically retrieved from the
system alias (specified with the setSystemAlias() method),
then it is not necessary to free it.updated - The number of rows in the database which were altered as a result of the update
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||