org.hsqldb
Interface Trigger
- All Known Implementing Classes:
- TriggerSample
- public interface Trigger
The interface an HSQLDB TRIGGER must implement
- Since:
- 1.7.0
- Author:
- Peter Hudson
Method Summary |
void |
fire(int type,
java.lang.String trigName,
java.lang.String tabName,
java.lang.Object[] row1,
java.lang.Object[] row2)
The method invoked upon each triggered action. |
INSERT_AFTER
public static final int INSERT_AFTER
- See Also:
- Constant Field Values
DELETE_AFTER
public static final int DELETE_AFTER
- See Also:
- Constant Field Values
UPDATE_AFTER
public static final int UPDATE_AFTER
- See Also:
- Constant Field Values
INSERT_BEFORE
public static final int INSERT_BEFORE
DELETE_BEFORE
public static final int DELETE_BEFORE
UPDATE_BEFORE
public static final int UPDATE_BEFORE
INSERT_AFTER_ROW
public static final int INSERT_AFTER_ROW
DELETE_AFTER_ROW
public static final int DELETE_AFTER_ROW
UPDATE_AFTER_ROW
public static final int UPDATE_AFTER_ROW
INSERT_BEFORE_ROW
public static final int INSERT_BEFORE_ROW
DELETE_BEFORE_ROW
public static final int DELETE_BEFORE_ROW
UPDATE_BEFORE_ROW
public static final int UPDATE_BEFORE_ROW
fire
public void fire(int type,
java.lang.String trigName,
java.lang.String tabName,
java.lang.Object[] row1,
java.lang.Object[] row2)
- The method invoked upon each triggered action.
When UPDATE triggers are fired, row1 contains the
existing values of the table row and row2 contains the
new values.
For INSERT triggers, row1 is null and row2 contains the
table row to be inserted.
For DELETE triggers, row2 is null and row1 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 occuringrow1
- the old rowrow2
- the new row
Copyright © 2001 - 2004 HSQL Development Group. All Rights Reserved.