TriggerObject

A trigger is created using the statement CREATE TRIGGER

Methods
void checkRename()
void checkRename()
void close()
Close the trigger.
void close() throws SQLException
Close the trigger.
void fire(Session session, int type, boolean beforeAction)
Call the trigger class if required.
void fire(Session session, int type, boolean beforeAction)
Call the trigger class if required. This method does nothing if the trigger is not defined for the given action. This method is called before or after any rows have been processed, once for each statement.
Parameters:
session - the session
type - the trigger type
beforeAction - if this method is called before applying the changes
boolean fireRow(Session session, Table table, Row oldRow, Row newRow, boolean beforeAction, boolean rollback)
Call the fire method of the user-defined trigger class if required.
boolean fireRow(Session session, Table table, Row oldRow, Row newRow, boolean beforeAction, boolean rollback)
Call the fire method of the user-defined trigger class if required. This method does nothing if the trigger is not defined for the given action. This method is called before or after a row is processed, possibly many times for each statement.
Parameters:
session - the session
table - the table
oldRow - the old row
newRow - the new row
beforeAction - true if this method is called before the operation is applied
rollback - when the operation occurred within a rollback
Returns:
true if no further action is required (for 'instead of' triggers)
String getCreateSQL()
String getCreateSQL()
String getCreateSQLForCopy(Table targetTable, String quotedName)
String getCreateSQLForCopy(Table targetTable, String quotedName)
String getDropSQL()
String getDropSQL()
int getQueueSize()
int getQueueSize()
Table getTable()
Get the table of this trigger.
Table getTable()
Get the table of this trigger.
Returns:
the table
String getTriggerClassName()
Get the trigger class name.
String getTriggerClassName()
Get the trigger class name.
Returns:
the class name
String getTriggerSource()
String getTriggerSource()
int getType()
int getType()
String getTypeNameList()
String getTypeNameList()
boolean isBefore()
Check if this is a before trigger.
boolean isBefore()
Check if this is a before trigger.
Returns:
true if it is
boolean isNoWait()
boolean isNoWait()
boolean isSelectTrigger()
Check whether this is a select trigger.
boolean isSelectTrigger()
Check whether this is a select trigger.
Returns:
true if it is
void removeChildrenAndResources(Session session)
void removeChildrenAndResources(Session session)
void setBefore(boolean before)
void setBefore(boolean before)
void setInsteadOf(boolean insteadOf)
void setInsteadOf(boolean insteadOf)
void setNoWait(boolean noWait)
void setNoWait(boolean noWait)
void setOnRollback(boolean onRollback)
void setOnRollback(boolean onRollback)
void setQueueSize(int size)
void setQueueSize(int size)
void setRowBased(boolean rowBased)
void setRowBased(boolean rowBased)
void setTriggerClassName(String triggerClassName, boolean force)
Set the trigger class name and load the class if possible.
void setTriggerClassName(String triggerClassName, boolean force)
Set the trigger class name and load the class if possible.
Parameters:
triggerClassName - the name of the trigger class
force - whether exceptions (due to missing class or access rights) should be ignored
void setTriggerSource(String source, boolean force)
Set the trigger source code and compile it if possible.
void setTriggerSource(String source, boolean force)
Set the trigger source code and compile it if possible.
Parameters:
source - the source code of a method returning a {@link Trigger}
force - whether exceptions (due to syntax error) should be ignored
void setTypeMask(int typeMask)
Set the trigger type.
void setTypeMask(int typeMask)
Set the trigger type.
Parameters:
typeMask - the type

Fields
static int DEFAULT_QUEUE_SIZE = 1024

DEFAULT_QUEUE_SIZE = 1024

The default queue size.