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 Activation
private ConnectionContext
private int
private GenericTriggerExecutor[][]
private LanguageConnectionContext
private String
private UUID
private String
private InternalTriggerExecutionContext
private TriggerInfo
-
Constructor Summary
ConstructorsConstructorDescriptionTriggerEventActivator
(LanguageConnectionContext lcc, UUID tableId, TriggerInfo triggerInfo, int dmlType, Activation activation, Vector<AutoincrementCounter> aiCounters) Basic constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
Clean up and release resources.void
notifyEvent
(TriggerEvent event, CursorResultSet brs, CursorResultSet ars, int[] colsReadFromTable) Handle the given event.(package private) void
reopen()
Reopen the trigger activator.private void
setupExecutors
(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
-