org.hsqldb

Interface Trigger

public interface Trigger

The 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
intDELETE_AFTER
intDELETE_AFTER_ROW
intDELETE_BEFORE
intDELETE_BEFORE_ROW
intINSERT_AFTER
intINSERT_AFTER_ROW
intINSERT_BEFORE
intINSERT_BEFORE_ROW
intUPDATE_AFTER
intUPDATE_AFTER_ROW
intUPDATE_BEFORE
intUPDATE_BEFORE_ROW
Method Summary
voidfire(int type, String trigName, String tabName, Object[] oldRow, Object[] newRow)
The method invoked upon each triggered action.

Field Detail

DELETE_AFTER

public int DELETE_AFTER

DELETE_AFTER_ROW

public int DELETE_AFTER_ROW

DELETE_BEFORE

public int DELETE_BEFORE

DELETE_BEFORE_ROW

public int DELETE_BEFORE_ROW

INSERT_AFTER

public int INSERT_AFTER

INSERT_AFTER_ROW

public int INSERT_AFTER_ROW

INSERT_BEFORE

public int INSERT_BEFORE

INSERT_BEFORE_ROW

public int INSERT_BEFORE_ROW

UPDATE_AFTER

public int UPDATE_AFTER

UPDATE_AFTER_ROW

public int UPDATE_AFTER_ROW

UPDATE_BEFORE

public int UPDATE_BEFORE

UPDATE_BEFORE_ROW

public int UPDATE_BEFORE_ROW

Method Detail

fire

public void fire(int type, String trigName, String tabName, Object[] oldRow, 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 trigger tabName the name of the table upon which the triggered action is occuring oldRow the old row newRow the new row

Copyright B) 2001 - 2005 HSQL Development Group. All Rights Reserved.