Package | Class | Tree | Deprecated
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hsqldb
Class TriggerDef

    java.lang.Object
      |
      +--java.lang.Thread
            |
            +--org.hsqldb.TriggerDef

class TriggerDef
extends java.lang.Thread

TriggerDef class declaration Definition and execution of triggers Development of the trigger implementation sponsored by Logicscope Realisations Ltd

Field Summary
`protected boolean` | `busy`
`(package private) static int` | `DELETE_AFTER`
`(package private) static int` | `DELETE_AFTER_ROW`
`(package private) static int` | `DELETE_BEFORE`
`(package private) static int` | `DELETE_BEFORE_ROW`
`(package private) java.lang.String` | `fire`
`(package private) boolean` | `forEachRow`
`(package private) static int` | `INSERT_AFTER`
`(package private) static int` | `INSERT_AFTER_ROW`
`(package private) static int` | `INSERT_BEFORE`
`(package private) static int` | `INSERT_BEFORE_ROW`
`(package private) java.lang.String` | `name`
`(package private) static int` | `NUM_TRIGGER_OPS` member variables
`(package private) static int` | `NUM_TRIGS`
`(package private) java.lang.String` | `operation`
`(package private) java.lang.Object[]` | `rowForTrigger`
`(package private) Table` | `table`
`(package private) Trigger` | `trig`
`(package private) static int` | `UPDATE_AFTER`
`(package private) static int` | `UPDATE_AFTER_ROW`
`(package private) static int` | `UPDATE_BEFORE`
`(package private) static int` | `UPDATE_BEFORE_ROW`
`protected boolean` | `valid`
`(package private) int` | `vectorIndx`
`(package private) java.lang.String` | `when`

Fields inherited from class java.lang.Thread
`MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY, values`

Constructor Summary
`TriggerDef(java.lang.String sName, java.lang.String sWhen, java.lang.String sOper, boolean bForEach, Table pTab, Trigger pTrig, java.lang.String sFire)` Constructor declaration create an object from the components of an SQL CREATE TRIGGER statement

Method Summary
`boolean` | `isBusy()` Method declaration
`boolean` | `isValid()` Method declaration
`static int` | `numTrigs()` Method declaration
`void` | `pop()` pop method declaration
`void` | `push(java.lang.Object[] row)` push method declaration
`void` | `run()` run method declaration
`int` | `SqlToIndex()` SqlToIndex method declaration
`java.lang.StringBuffer` | `toBuf()` Method declaration

Methods inherited from class java.lang.Thread
`, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### NUM_TRIGGER_OPS

    static final int NUM_TRIGGER_OPS

  member variables

### NUM_TRIGS

    static final int NUM_TRIGS

### INSERT_AFTER

    static final int INSERT_AFTER

### DELETE_AFTER

    static final int DELETE_AFTER

### UPDATE_AFTER

    static final int UPDATE_AFTER

### INSERT_BEFORE

    static final int INSERT_BEFORE

### DELETE_BEFORE

    static final int DELETE_BEFORE

### UPDATE_BEFORE

    static final int UPDATE_BEFORE

### INSERT_AFTER_ROW

    static final int INSERT_AFTER_ROW

### DELETE_AFTER_ROW

    static final int DELETE_AFTER_ROW

### UPDATE_AFTER_ROW

    static final int UPDATE_AFTER_ROW

### INSERT_BEFORE_ROW

    static final int INSERT_BEFORE_ROW

### DELETE_BEFORE_ROW

    static final int DELETE_BEFORE_ROW

### UPDATE_BEFORE_ROW

    static final int UPDATE_BEFORE_ROW

### name

    java.lang.String name

### when

    java.lang.String when

### operation

    java.lang.String operation

### forEachRow

    boolean forEachRow

### table

    Table table

### trig

    Trigger trig

### fire

    java.lang.String fire

### vectorIndx

    int vectorIndx

### rowForTrigger

    java.lang.Object[] rowForTrigger

### busy

    protected boolean busy

### valid

    protected boolean valid

Constructor Detail

### TriggerDef

    public TriggerDef(java.lang.String sName,
                      java.lang.String sWhen,
                      java.lang.String sOper,
                      boolean bForEach,
                      Table pTab,
                      Trigger pTrig,
                      java.lang.String sFire)

  Constructor declaration create an object from the components of an SQL CREATE TRIGGER statement
  Parameters:
    `sName` -
    `sWhen` -
    `sOper` -
    `bForEach` -
    `pTab` -
    `pTrig` -
    `sFire` -

Method Detail

### toBuf

    public java.lang.StringBuffer toBuf()

  Method declaration
  Returns:

### SqlToIndex

    public int SqlToIndex()

  SqlToIndex method declaration

  Given the SQL creating the trigger, say what the index to the Vector[] is

  Returns:
    index to the Vector[]

### run

    public void run()

  run method declaration

  the trigger JSP is run in its own thread here. Its job is simply to wait until it is told by the main thread that it should fire the trigger.

  Overrides:
    run in class java.lang.Thread

### pop

    public void pop()

  pop method declaration

  The consumer (trigger) thread waits for an event to be queued

  Note: This push/pop pairing assumes a single produced thread and a single consumer thread _only_.

### push

    public void push(java.lang.Object[] row)

  push method declaration

  The main thread tells the trigger thread to fire by this call

  Parameters:
    `row[]` -

### numTrigs

    public static int numTrigs()

  Method declaration
  Returns:

### isBusy

    public boolean isBusy()

  Method declaration
  Returns:

### isValid

    public boolean isValid()

  Method declaration
  Returns:

Package | Class | Tree | Deprecated
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD