public interface TriggerExecutionContext
Modifier and Type | Field and Description |
---|---|
static int |
DELETE_EVENT
Return value from getEventType() for
a delete trigger.
|
static int |
INSERT_EVENT
Return value from getEventType() for
an insert trigger.
|
static int |
UPDATE_EVENT
Return value from getEventType() for
an update trigger.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEventStatementText()
Get the text of the statement that caused the
trigger to fire.
|
int |
getEventType()
Get the type for the event that caused the
trigger to fire.
|
java.lang.String[] |
getModifiedColumns()
Get the columns that have been modified by the statement
that caused this trigger to fire.
|
java.sql.ResultSet |
getNewRow()
Like getNewRowSet(), but returns a result set positioned
on the first row of the after (new) result set.
|
java.sql.ResultSet |
getNewRowSet()
Returns a result set of the new (after) images of the changed rows.
|
java.sql.ResultSet |
getOldRow()
Like getOldRowSet(), but returns a result set positioned
on the first row of the before (old) result set.
|
java.sql.ResultSet |
getOldRowSet()
Returns a result set of the old (before) images of the changed rows.
|
UUID |
getTargetTableId()
Get the target table UUID upon which the
trigger event is declared.
|
java.lang.String |
getTargetTableName()
Get the target table name upon which the
trigger event is declared.
|
boolean |
wasColumnModified(int columnNumber)
Find out if a column was changed, by column number
|
boolean |
wasColumnModified(java.lang.String columnName)
Find out if a column was changed, by column name.
|
static final int UPDATE_EVENT
static final int DELETE_EVENT
static final int INSERT_EVENT
java.lang.String getTargetTableName()
UUID getTargetTableId()
int getEventType()
java.lang.String getEventStatementText()
java.lang.String[] getModifiedColumns()
boolean wasColumnModified(java.lang.String columnName)
columnName
- the column to checkboolean wasColumnModified(int columnNumber)
columnNumber
- the column to checkjava.sql.ResultSet getOldRowSet() throws java.sql.SQLException
Will return null if the call is inapplicable for the trigger that is currently executing. For example, will return null if called during a the firing of an INSERT trigger.
java.sql.SQLException
- if called after the triggering event has
completedjava.sql.ResultSet getNewRowSet() throws java.sql.SQLException
Will return null if the call is inapplicable for the trigger that is currently executing. For example, will return null if called during the firing of a DELETE trigger.
java.sql.SQLException
- if called after the triggering event has
completedjava.sql.ResultSet getOldRow() throws java.sql.SQLException
Will return null if the call is inapplicable for the trigger that is currently executing. For example, will return null if called during a the firing of an INSERT trigger.
java.sql.SQLException
- if called after the triggering event has
completedjava.sql.ResultSet getNewRow() throws java.sql.SQLException
Will return null if the call is inapplicable for the trigger that is currently executing. For example, will return null if called during the firing of a DELETE trigger.
java.sql.SQLException
- if called after the triggering event has
completedApache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.