Package org.hsqldb
Interface Trigger
-
- All Known Implementing Classes:
TriggerSample
public interface TriggerThe interface an HSQLDB TRIGGER must implement. The user-supplied class that implements this must have a default constructor.- Since:
- 1.7.0
- Author:
- Peter Hudson
-
-
Field Summary
Fields Modifier and Type Field Description static intDELETE_AFTERstatic intDELETE_AFTER_ROWstatic intDELETE_BEFOREstatic intDELETE_BEFORE_ROWstatic intINSERT_AFTERstatic intINSERT_AFTER_ROWstatic intINSERT_BEFOREstatic intINSERT_BEFORE_ROWstatic intUPDATE_AFTERstatic intUPDATE_AFTER_ROWstatic intUPDATE_BEFOREstatic intUPDATE_BEFORE_ROW
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidfire(int type, java.lang.String trigName, java.lang.String tabName, java.lang.Object[] oldRow, java.lang.Object[] newRow)The method invoked upon each triggered action.
-
-
-
Field Detail
-
INSERT_AFTER
static final int INSERT_AFTER
- See Also:
- Constant Field Values
-
DELETE_AFTER
static final int DELETE_AFTER
- See Also:
- Constant Field Values
-
UPDATE_AFTER
static final int UPDATE_AFTER
- See Also:
- Constant Field Values
-
INSERT_BEFORE
static final int INSERT_BEFORE
- See Also:
- Constant Field Values
-
DELETE_BEFORE
static final int DELETE_BEFORE
- See Also:
- Constant Field Values
-
UPDATE_BEFORE
static final int UPDATE_BEFORE
- See Also:
- Constant Field Values
-
INSERT_AFTER_ROW
static final int INSERT_AFTER_ROW
- See Also:
- Constant Field Values
-
DELETE_AFTER_ROW
static final int DELETE_AFTER_ROW
- See Also:
- Constant Field Values
-
UPDATE_AFTER_ROW
static final int UPDATE_AFTER_ROW
- See Also:
- Constant Field Values
-
INSERT_BEFORE_ROW
static final int INSERT_BEFORE_ROW
- See Also:
- Constant Field Values
-
DELETE_BEFORE_ROW
static final int DELETE_BEFORE_ROW
- See Also:
- Constant Field Values
-
UPDATE_BEFORE_ROW
static final int UPDATE_BEFORE_ROW
- See Also:
- Constant Field Values
-
-
Method Detail
-
fire
void fire(int type, java.lang.String trigName, java.lang.String tabName, java.lang.Object[] oldRow, java.lang.Object[] newRow)The method invoked upon each triggered action.When UPDATE triggers are fired, oldRow contains the existing values of the table row and newRow contains the new values.
For INSERT triggers, oldRow is null and newRow contains the table row to be inserted. For DELETE triggers, newRow is null and oldRow contains the table row to be deleted. type contains the integer index id for trigger type, e.g. TriggerDef.INSERT_AFTER (fredt@users)
- Parameters:
trigName- the name of the triggertabName- the name of the table upon which the triggered action is occuringoldRow- the old rownewRow- the new row
-
-