|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> [ db overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.iapi.db
Interface TriggerExecutionContext

- public interface TriggerExecutionContext
A trigger execution context holds information that is available from the context of a trigger invocation.
IBM Corp. reserves the right to change, rename, or remove this interface at any time.
| Field Summary | |
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. |
| Method Summary | |
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. |
org.apache.derby.catalog.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. |
| Field Detail |
UPDATE_EVENT
public static final int UPDATE_EVENT
- Return value from getEventType() for
an update trigger.
- See Also:
- Constant Field Values
DELETE_EVENT
public static final int DELETE_EVENT
- Return value from getEventType() for
a delete trigger.
- See Also:
- Constant Field Values
INSERT_EVENT
public static final int INSERT_EVENT
- Return value from getEventType() for
an insert trigger.
- See Also:
- Constant Field Values
| Method Detail |
getTargetTableName
public java.lang.String getTargetTableName()
- Get the target table name upon which the
trigger event is declared.
getTargetTableId
public org.apache.derby.catalog.UUID getTargetTableId()
- Get the target table UUID upon which the
trigger event is declared.
getEventType
public int getEventType()
- Get the type for the event that caused the
trigger to fire.
getEventStatementText
public java.lang.String getEventStatementText()
- Get the text of the statement that caused the
trigger to fire.
getModifiedColumns
public java.lang.String[] getModifiedColumns()
- Get the columns that have been modified by the statement
that caused this trigger to fire. If all columns are
modified, will return null (e.g. for INSERT or DELETE
return null).
wasColumnModified
public boolean wasColumnModified(java.lang.String columnName)
- Find out if a column was changed, by column name.
wasColumnModified
public boolean wasColumnModified(int columnNumber)
- Find out if a column was changed, by column number
getOldRowSet
public java.sql.ResultSet getOldRowSet() throws java.sql.SQLException
- Returns a result set of the old (before) images of the changed rows.
For a row trigger, this result set will have a single row. For
a statement trigger, this result set has every row that has
changed or will change. If a statement trigger does not affect
a row, then the result set will be empty (i.e. ResultSet.next()
will return false).
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.
getNewRowSet
public java.sql.ResultSet getNewRowSet() throws java.sql.SQLException
- Returns a result set of the new (after) images of the changed rows.
For a row trigger, this result set will have a single row. For
a statement trigger, this result set has every row that has
changed or will change. If a statement trigger does not affect
a row, then the result set will be empty (i.e. ResultSet.next()
will return false).
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.
getOldRow
public java.sql.ResultSet getOldRow() throws java.sql.SQLException
- Like getOldRowSet(), but returns a result set positioned
on the first row of the before (old) result set. Used as a convenience
to get a column for a row trigger. Equivalent to getOldRowSet()
followed by next().
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.
getNewRow
public java.sql.ResultSet getNewRow() throws java.sql.SQLException
- Like getNewRowSet(), but returns a result set positioned
on the first row of the after (new) result set. Used as a convenience
to get a column for a row trigger. Equivalent to getNewRowSet()
followed by next().
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.
|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> [ db overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC