|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.iapi.services.context.ContextImpl
org.apache.derby.impl.sql.execute.GenericExecutionContext
ExecutionContext stores the result set factory to be used by the current connection, and manages execution-level connection activities.
An execution context is expected to be on the stack for the duration of the connection.
Field Summary | |
protected ExecutionFactory |
execFactory
|
protected ResultSetFactory |
rsFactory
|
protected ResultSetStatisticsFactory |
rssFactory
|
private ResultSet |
sourceRS
|
Fields inherited from class org.apache.derby.iapi.services.context.ContextImpl |
|
Fields inherited from interface org.apache.derby.iapi.sql.execute.ExecutionContext |
CONTEXT_ID, CS_TO_JDBC_ISOLATION_LEVEL_MAP, CS_TO_SQL_ISOLATION_MAP, READ_COMMITTED_ISOLATION_LEVEL, READ_UNCOMMITTED_ISOLATION_LEVEL, REPEATABLE_READ_ISOLATION_LEVEL, SERIALIZABLE_ISOLATION_LEVEL, UNSPECIFIED_ISOLATION_LEVEL |
Constructor Summary | |
GenericExecutionContext(ResultSetFactory rsf,
ContextManager cm,
ExecutionFactory ef)
|
Method Summary | |
void |
beginStatement(ResultSet sourceRS)
Mark the beginning of a statement (INSERT, UPDATE, DELETE) |
void |
cleanupOnError(java.lang.Throwable error)
Contexts will be passed errors that are caught by the outer system when they are serious enough to require corrective action. |
void |
endStatement()
The end of a statement (INSERT, UPDATE, DELETE) |
ExecutionFactory |
getExecutionFactory()
Get the ExecutionFactory from this ExecutionContext. |
ResultSetFactory |
getResultSetFactory()
Get the ResultSetFactory from this ExecutionContext. |
ResultSetStatisticsFactory |
getResultSetStatisticsFactory()
Get the ResultSetStatisticsFactory from this ExecutionContext. |
java.lang.Object[] |
siftForeignKeys(java.lang.Object[] fullList)
Sifts the array of foreign key constraints for the ones which apply in the current context. |
java.lang.Object |
siftTriggers(java.lang.Object triggerInfo)
Sifts the triggers for the ones which apply in the current context. |
Methods inherited from class org.apache.derby.iapi.services.context.ContextImpl |
appendErrorInfo, getContextManager, getIdName, isLastHandler, popMe, pushMe |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.derby.iapi.services.context.Context |
getContextManager, getIdName, isLastHandler, popMe, pushMe |
Field Detail |
private ResultSet sourceRS
protected ResultSetFactory rsFactory
protected ResultSetStatisticsFactory rssFactory
protected ExecutionFactory execFactory
Constructor Detail |
public GenericExecutionContext(ResultSetFactory rsf, ContextManager cm, ExecutionFactory ef)
Method Detail |
public ResultSetFactory getResultSetFactory()
getResultSetFactory
in interface ExecutionContext
public ResultSetStatisticsFactory getResultSetStatisticsFactory() throws StandardException
getResultSetStatisticsFactory
in interface ExecutionContext
StandardException
- Thrown on errorpublic ExecutionFactory getExecutionFactory()
ExecutionContext
getExecutionFactory
in interface ExecutionContext
public void beginStatement(ResultSet sourceRS) throws StandardException
ExecutionContext
beginStatement
in interface ExecutionContext
sourceRS
- Source ResultSet for the statement.
StandardException
- Thrown on errorExecutionContext.beginStatement(org.apache.derby.iapi.sql.ResultSet)
public void endStatement() throws StandardException
ExecutionContext
endStatement
in interface ExecutionContext
StandardException
- Thrown on errorExecutionContext.endStatement()
public java.lang.Object[] siftForeignKeys(java.lang.Object[] fullList) throws StandardException
ExecutionContext
siftForeignKeys
in interface ExecutionContext
fullList
- the full list of foreign keys that
apply for the current statement
StandardException
- Thrown on errorExecutionContext.siftForeignKeys(java.lang.Object[])
public java.lang.Object siftTriggers(java.lang.Object triggerInfo) throws StandardException
ExecutionContext
siftTriggers
in interface ExecutionContext
triggerInfo
- the original trigger info
StandardException
- Thrown on errorExecutionContext.siftTriggers(java.lang.Object)
public void cleanupOnError(java.lang.Throwable error) throws StandardException
Context
Contexts must release all their resources before removing themselves from their context manager.
The context manager will "unwind" the contexts during cleanup in the reverse order they were placed on its global stack.
If error is an instance of StandardException then an implementation of this method may throw a new exception if and only if the new exception is an instance of StandardException that is more severe than the original error or the new exception is a not an instance of StandardException (e.g java.lang.NullPointerException).
cleanupOnError
in interface Context
StandardException
- Thrown on error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |