Class TriggerEventActivator
java.lang.Object
org.apache.derby.impl.sql.execute.TriggerEventActivator
Responsible for firing a trigger or set of triggers
based on an event.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Activationprivate ConnectionContextprivate intprivate GenericTriggerExecutor[][]private LanguageConnectionContextprivate Stringprivate UUIDprivate Stringprivate InternalTriggerExecutionContextprivate TriggerInfo -
Constructor Summary
ConstructorsConstructorDescriptionTriggerEventActivator(LanguageConnectionContext lcc, UUID tableId, TriggerInfo triggerInfo, int dmlType, Activation activation, Vector<AutoincrementCounter> aiCounters) Basic constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Clean up and release resources.voidnotifyEvent(TriggerEvent event, CursorResultSet brs, CursorResultSet ars, int[] colsReadFromTable) Handle the given event.(package private) voidreopen()Reopen the trigger activator.private voidsetupExecutors(TriggerInfo triggerInfo)
-
Field Details
-
lcc
-
triggerInfo
-
tec
-
executors
-
activation
-
cc
-
statementText
-
dmlType
private int dmlType -
tableId
-
tableName
-
-
Constructor Details
-
TriggerEventActivator
public TriggerEventActivator(LanguageConnectionContext lcc, UUID tableId, TriggerInfo triggerInfo, int dmlType, Activation activation, Vector<AutoincrementCounter> aiCounters) throws StandardException Basic constructor- Parameters:
lcc- the lcctriggerInfo- the trigger informationdmlType- Type of DML for which this trigger is being fired.activation- the activation.aiCounters- vector of ai counters- Throws:
StandardException- on error
-
-
Method Details
-
reopen
Reopen the trigger activator. Just creates a new trigger execution context. Note that close() still must be called when you are done -- you cannot just do a reopen() w/o a first doing a close.- Throws:
StandardException- on error
-
setupExecutors
- Throws:
StandardException
-
notifyEvent
public void notifyEvent(TriggerEvent event, CursorResultSet brs, CursorResultSet ars, int[] colsReadFromTable) throws StandardException Handle the given event.- Parameters:
event- a trigger eventbrs- the before result set. Typically a TemporaryRowHolderResultSet but sometimes a BulkTableScanResultSetars- the after result set. Typically a TemporaryRowHolderResultSet but sometimes a BulkTableScanResultSetcolsReadFromTable- columns required from the trigger table by the triggering sql- Throws:
StandardException- on error
-
cleanup
Clean up and release resources.- Throws:
StandardException- on unexpected error
-