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

java.lang.Object
  extended by org.apache.derby.impl.sql.execute.GenericTriggerExecutor
Direct Known Subclasses:
RowTriggerExecutor, StatementTriggerExecutor

public abstract class GenericTriggerExecutor
extends java.lang.Object

A trigger executor is an object that executes a trigger. It is subclassed by row and statement executors.


Field Summary
private  SPSDescriptor action
           
private  boolean actionRetrieved
           
protected  Activation activation
           
protected  LanguageConnectionContext lcc
           
private  ExecPreparedStatement ps
           
private  Activation spsActivation
           
protected  InternalTriggerExecutionContext tec
           
protected  TriggerDescriptor triggerd
           
private  SPSDescriptor whenClause
           
private  boolean whenClauseRetrieved
           
 
Constructor Summary
GenericTriggerExecutor(InternalTriggerExecutionContext tec, TriggerDescriptor triggerd, Activation activation, LanguageConnectionContext lcc)
          Constructor
 
Method Summary
protected  void clearSPS()
          Cleanup after executing an sps.
protected  void executeSPS(SPSDescriptor sps)
          Execute the given stored prepared statement.
(package private) abstract  void fireTrigger(TriggerEvent event, CursorResultSet brs, CursorResultSet ars)
          Fire the trigger based on the event.
protected  SPSDescriptor getAction()
           
protected  SPSDescriptor getWhenClause()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tec

protected InternalTriggerExecutionContext tec

triggerd

protected TriggerDescriptor triggerd

activation

protected Activation activation

lcc

protected LanguageConnectionContext lcc

whenClauseRetrieved

private boolean whenClauseRetrieved

actionRetrieved

private boolean actionRetrieved

whenClause

private SPSDescriptor whenClause

action

private SPSDescriptor action

ps

private ExecPreparedStatement ps

spsActivation

private Activation spsActivation
Constructor Detail

GenericTriggerExecutor

GenericTriggerExecutor(InternalTriggerExecutionContext tec,
                       TriggerDescriptor triggerd,
                       Activation activation,
                       LanguageConnectionContext lcc)
Constructor

Parameters:
tec - the execution context
triggerd - the trigger descriptor
activation - the activation
lcc - the lcc
Method Detail

fireTrigger

abstract void fireTrigger(TriggerEvent event,
                          CursorResultSet brs,
                          CursorResultSet ars)
                   throws StandardException
Fire the trigger based on the event.

Parameters:
event - the trigger event
brs - the before result set
ars - the after result set
Throws:
StandardException - on error or user exception from trigger action

getWhenClause

protected SPSDescriptor getWhenClause()
                               throws StandardException
Throws:
StandardException

getAction

protected SPSDescriptor getAction()
                           throws StandardException
Throws:
StandardException

executeSPS

protected void executeSPS(SPSDescriptor sps)
                   throws StandardException
Execute the given stored prepared statement. We just grab the prepared statement from the spsd, get a new activation holder and let er rip.

Throws:
StandardException - on error

clearSPS

protected void clearSPS()
                 throws StandardException
Cleanup after executing an sps.

Throws:
StandardException - on error

Built on Thu 2011-03-10 11:54:14+0000, from revision ???

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