org.apache.derby.impl.sql.execute
Class TriggerEventActivator

java.lang.Object
  extended by org.apache.derby.impl.sql.execute.TriggerEventActivator

public class TriggerEventActivator
extends java.lang.Object

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


Field Summary
private  Activation activation
           
private  java.util.Vector aiCounters
           
private  ConnectionContext cc
           
private  int dmlType
           
private  GenericTriggerExecutor[][] executors
           
private  LanguageConnectionContext lcc
           
private  java.lang.String statementText
           
private  UUID tableId
           
private  java.lang.String tableName
           
private  TransactionController tc
           
private  InternalTriggerExecutionContext tec
           
private  TriggerInfo triggerInfo
           
 
Constructor Summary
TriggerEventActivator(LanguageConnectionContext lcc, TransactionController tc, UUID tableId, TriggerInfo triggerInfo, int dmlType, Activation activation, java.util.Vector aiCounters)
          Basic constructor
 
Method Summary
 void cleanup()
          Clean up and release resources.
 void notifyEvent(TriggerEvent event, CursorResultSet brs, CursorResultSet ars)
          Handle the given event.
(package private)  void reopen()
          Reopen the trigger activator.
private  void setupExecutors(TriggerInfo triggerInfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lcc

private LanguageConnectionContext lcc

tc

private TransactionController tc

triggerInfo

private TriggerInfo triggerInfo

tec

private InternalTriggerExecutionContext tec

executors

private GenericTriggerExecutor[][] executors

activation

private Activation activation

cc

private ConnectionContext cc

statementText

private java.lang.String statementText

dmlType

private int dmlType

tableId

private UUID tableId

tableName

private java.lang.String tableName

aiCounters

private java.util.Vector aiCounters
Constructor Detail

TriggerEventActivator

public TriggerEventActivator(LanguageConnectionContext lcc,
                             TransactionController tc,
                             UUID tableId,
                             TriggerInfo triggerInfo,
                             int dmlType,
                             Activation activation,
                             java.util.Vector aiCounters)
                      throws StandardException
Basic constructor

Parameters:
lcc - the lcc
tc - the xact controller
triggerInfo - the trigger information
dmlType - Type of DML for which this trigger is being fired.
activation - the activation.
aiCounters - vector of ai counters
Throws:
StandardException - on error
Method Detail

reopen

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.

Throws:
StandardException - on error

setupExecutors

private void setupExecutors(TriggerInfo triggerInfo)
                     throws StandardException
Throws:
StandardException

notifyEvent

public void notifyEvent(TriggerEvent event,
                        CursorResultSet brs,
                        CursorResultSet ars)
                 throws StandardException
Handle the given event.

Parameters:
event - a trigger event
brs - the before result set. Typically a TemporaryRowHolderResultSet but sometimes a BulkTableScanResultSet
ars - the after result set. Typically a TemporaryRowHolderResultSet but sometimes a BulkTableScanResultSet
Throws:
StandardException - on error

cleanup

public void cleanup()
             throws StandardException
Clean up and release resources.

Throws:
StandardException - on unexpected error

Built on Thu 2012-03-29 21:53:33+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.