Documentation of 'org.hsqldb.TriggerDef' Java class
TriggerDef
org.hsqldb

Class TriggerDef

  • All Implemented Interfaces:
    java.lang.Runnable, SchemaObject
    Direct Known Subclasses:
    TriggerDefSQL


    public class TriggerDef
    extends java.lang.Object
    implements java.lang.Runnable, SchemaObject
    Represents an HSQLDB Trigger definition.

    Provides services regarding HSQLDB Trigger execution and metadata.

    Development of the trigger implementation sponsored by Logicscope Realisations Ltd

    Since:
    hsqldb 1.61
    • Constructor Detail

      • TriggerDef

        public TriggerDef(HsqlNameManager.HsqlName name,
                          int when,
                          int operation,
                          boolean forEach,
                          Table table,
                          Table[] transitions,
                          RangeVariable[] rangeVars,
                          Expression condition,
                          java.lang.String conditionSQL,
                          int[] updateColumns,
                          java.lang.String triggerClassName,
                          boolean noWait,
                          int queueSize)
        Constructs a new TriggerDef object to represent an HSQLDB trigger declared in an SQL CREATE TRIGGER statement. Changes in 1.7.2 allow the queue size to be specified as 0. A zero queue size causes the Trigger.fire() code to run in the main thread of execution (fully inside the enclosing transaction). Otherwise, the code is run in the Trigger's own thread. (fredt@users)
        Parameters:
        name - The trigger object's HsqlName
        when - whether the trigger fires before, after or instead of the triggering event
        operation - the triggering operation; currently insert, update, or delete
        forEach - indicates whether the trigger is fired for each row (true) or statement (false)
        table - the Table object upon which the indicated operation fires the trigger
        triggerClassName - the fully qualified named of the class implementing the org.hsqldb.Trigger (trigger body) interface
        noWait - do not wait for available space on the pending queue; if the pending queue does not have fewer than nQueueSize queued items, then overwrite the current tail instead
        queueSize - the length to which the pending queue may grow before further additions are either blocked or overwrite the tail entry, as determined by noWait
    • Method Detail

      • isValid

        public boolean isValid()
      • getSQL

        public java.lang.String getSQL()
        Retrieves the SQL character sequence required to (re)create the trigger, as a StringBuffer
        Specified by:
        getSQL in interface SchemaObject
        Returns:
        the SQL character sequence required to (re)create the trigger
      • getSQLMain

        public java.lang.StringBuffer getSQLMain()
      • getClassName

        public java.lang.String getClassName()
      • getActionTimingString

        public java.lang.String getActionTimingString()
      • getEventTypeString

        public java.lang.String getEventTypeString()
      • isSystem

        public boolean isSystem()
      • isForEachRow

        public boolean isForEachRow()
      • getConditionSQL

        public java.lang.String getConditionSQL()
      • getProcedureSQL

        public java.lang.String getProcedureSQL()
      • getUpdateColumnIndexes

        public int[] getUpdateColumnIndexes()
      • hasOldTable

        public boolean hasOldTable()
      • hasNewTable

        public boolean hasNewTable()
      • getOldTransitionRowName

        public java.lang.String getOldTransitionRowName()
      • getNewTransitionRowName

        public java.lang.String getNewTransitionRowName()
      • getOldTransitionTableName

        public java.lang.String getOldTransitionTableName()
      • getNewTransitionTableName

        public java.lang.String getNewTransitionTableName()
      • getStatementType

        public int getStatementType()
      • 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.

        Specified by:
        run in interface java.lang.Runnable
      • start

        public void start()
        start the thread if this is threaded
      • terminate

        public void terminate()
        signal the thread to stop
      • isBusy

        public boolean isBusy()
      • getTable

        public Table getTable()
      • getActionOrientationString

        public java.lang.String getActionOrientationString()

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.