public static class TriggerSample.MyTrigger extends java.lang.Object implements Trigger
| Constructor and Description |
|---|
MyTrigger() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
This method is called when the database is closed.
|
void |
fire(java.sql.Connection conn,
java.lang.Object[] oldRow,
java.lang.Object[] newRow)
This method is called for each triggered action.
|
void |
init(java.sql.Connection conn,
java.lang.String schemaName,
java.lang.String triggerName,
java.lang.String tableName,
boolean before,
int type)
Initializes the trigger.
|
void |
remove()
This method is called when the trigger is dropped.
|
public void init(java.sql.Connection conn,
java.lang.String schemaName,
java.lang.String triggerName,
java.lang.String tableName,
boolean before,
int type)
init in interface Triggerconn - a connection to the databaseschemaName - the name of the schematriggerName - the name of the trigger used in the CREATE TRIGGER
statementtableName - the name of the tablebefore - whether the fire method is called before or after the
operation is performedtype - the operation type: INSERT, UPDATE, or DELETEpublic void fire(java.sql.Connection conn,
java.lang.Object[] oldRow,
java.lang.Object[] newRow)
throws java.sql.SQLException
public void close()
Trigger