Top Description Fields Constructors Methods
org.apache.derby.impl.sql.execute

public Class TriggerEventActivator

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List, .Vector, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.sql.execute.CursorResultSet, .NoPutResultSet, org.apache.derby.iapi.sql.conn.LanguageConnectionContext, org.apache.derby.iapi.sql.dictionary.TriggerDescriptor, org.apache.derby.iapi.sql.Activation, org.apache.derby.iapi.jdbc.ConnectionContext, org.apache.derby.catalog.UUID

Responsible for firing a trigger or set of triggers based on an event.

Field Summary

Modifier and TypeField and Description
private Activation
private ConnectionContext
private int
private GenericTriggerExecutor[][]
private LanguageConnectionContext
private String
private UUID
private String
private InternalTriggerExecutionContext
private TriggerInfo

Constructor Summary

AccessConstructor and Description
public
TriggerEventActivator(LanguageConnectionContext
the lcc
lcc
,
UUID tableId, TriggerInfo
the trigger information
triggerInfo
,
int
Type of DML for which this trigger is being fired.
dmlType
,
Activation
the activation.
activation
,
Vector<AutoincrementCounter>
vector of ai counters
aiCounters
)

Basic constructor

Method Summary

Modifier and TypeMethod and Description
public void
cleanup()

Clean up and release resources.

public void
notifyEvent(TriggerEvent
a trigger event
event
,
CursorResultSet
the before result set. Typically a TemporaryRowHolderResultSet but sometimes a BulkTableScanResultSet
brs
,
CursorResultSet
the after result set. Typically a TemporaryRowHolderResultSet but sometimes a BulkTableScanResultSet
ars
,
int[]
columns required from the trigger table by the triggering sql
colsReadFromTable
)

Handle the given event.

pack-priv void
reopen()

Reopen the trigger activator.

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

activationback to summary
private Activation activation
ccback to summary
private ConnectionContext cc
dmlTypeback to summary
private int dmlType
executorsback to summary
private GenericTriggerExecutor[][] executors
lccback to summary
private LanguageConnectionContext lcc
statementTextback to summary
private String statementText
tableIdback to summary
private UUID tableId
tableNameback to summary
private String tableName
tecback to summary
private InternalTriggerExecutionContext tec
triggerInfoback to summary
private TriggerInfo triggerInfo

Constructor Detail

TriggerEventActivatorback to summary
public TriggerEventActivator(LanguageConnectionContext lcc, UUID tableId, TriggerInfo triggerInfo, int dmlType, Activation activation, Vector<AutoincrementCounter> aiCounters) throws StandardException

Basic constructor

Parameters
lcc:LanguageConnectionContext

the lcc

triggerInfo:TriggerInfo

the trigger information

dmlType:int

Type of DML for which this trigger is being fired.

activation:Activation

the activation.

aiCounters:Vector<AutoincrementCounter>

vector of ai counters

Annotations
@SuppressWarnings:UseOfObsoleteCollectionType
Exceptions
StandardException:
on error

Method Detail

cleanupback to summary
public void cleanup() throws StandardException

Clean up and release resources.

Exceptions
StandardException:
on unexpected error
notifyEventback to summary
public void notifyEvent(TriggerEvent event, CursorResultSet brs, CursorResultSet ars, int[] colsReadFromTable) throws StandardException

Handle the given event.

Parameters
event:TriggerEvent

a trigger event

brs:CursorResultSet

the before result set. Typically a TemporaryRowHolderResultSet but sometimes a BulkTableScanResultSet

ars:CursorResultSet

the after result set. Typically a TemporaryRowHolderResultSet but sometimes a BulkTableScanResultSet

colsReadFromTable:int[]

columns required from the trigger table by the triggering sql

Exceptions
StandardException:
on error
reopenback to summary
pack-priv void reopen() throws StandardException

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.

Exceptions
StandardException:
on error
setupExecutorsback to summary
private void setupExecutors(TriggerInfo triggerInfo) throws StandardException