Class Hierarchy All Classes All Fields and Methods
Class com.ibm.db.beans.DBEvent
java.lang.Object java.util.EventObject com.ibm.db.beans.DBEventpublic class DBEvent
extends EventObjectAll of the methods in the DBBeforeListener and DBAfterListener interfaces pass a DBEvent as a parameter. Methods in this class extend the information available from the parent class EventObject with a reason code, a modifier, and a sub-modifier.
Field Index Field Description MODIFIER_NONE Constant to be returned by getModifier() or getSubModifier() if value is not applicable. REASON_COLUMN_VALUE Constant to be returned by getReason() for rowSetChanged or aboutToChangeRowSet events when a column value is changing in the cache. REASON_DELETE Constant to be returned by getReason() for rowChanged or aboutToChangeRow events when a row is being deleted from the database. REASON_DELETE_CACHE_ROW Constant to be returned by getReason() for rowSetChanged or aboutToChangeRowSet events when a row is being deleted from the cache. REASON_EXECUTE Constant to be returned by getReason() for rowSetChanged or aboutToChangeRowSet events when an SQL statement is being executed. REASON_FETCH_CACHE_ROW Constant to be returned by getReason() for rowSetChanged or aboutToChangeRowSet events when one or more rows are being fetched into in the cache. REASON_INSERT Constant to be returned by getReason() for rowChanged or aboutToChangeRow events when a row is being inserted in the database. REASON_NEW_CACHE_ROW Constant to be returned by getReason() for rowSetChanged or aboutToChangeRowSet events when a new empty row is being added to the cache. REASON_NONE Constant to be returned by getReason() if value is not applicable. REASON_UPDATE Constant to be returned by getReason() for rowChanged or aboutToChangeRow events when a row is being updated in the database.
Constructor Index Constructor Description DBEvent(DBStatement) Constructs a new DBEvent, without providing a reason code, a modifier, or a sub-modifier. DBEvent(DBStatement, int) Constructs a new DBEvent, without providing a modifier or a sub-modifier. DBEvent(DBStatement, int, int) Constructs a new DBEvent, without providing a sub-modifier. DBEvent(DBStatement, int, int, int) Constructs a new DBEvent, providing a source, a reason, a modifier, and a sub-modifier.
Method Index Method Description int getModifier() Returns a modifier amplifying on the reason for the event. int getReason() Returns a code for the reason the event was fired. int getSubModifier() Returns a sub-modifier amplifying on the reason and modifier for the event.
Fields
MODIFIER_NONE
public static final int MODIFIER_NONEConstant to be returned by getModifier() or getSubModifier() if value is not applicable.
REASON_COLUMN_VALUE
public static final int REASON_COLUMN_VALUEConstant to be returned by getReason() for rowSetChanged or aboutToChangeRowSet events when a column value is changing in the cache.
REASON_DELETE
public static final int REASON_DELETEConstant to be returned by getReason() for rowChanged or aboutToChangeRow events when a row is being deleted from the database.
REASON_DELETE_CACHE_ROW
public static final int REASON_DELETE_CACHE_ROWConstant to be returned by getReason() for rowSetChanged or aboutToChangeRowSet events when a row is being deleted from the cache.
REASON_EXECUTE
public static final int REASON_EXECUTEConstant to be returned by getReason() for rowSetChanged or aboutToChangeRowSet events when an SQL statement is being executed.
REASON_FETCH_CACHE_ROW
public static final int REASON_FETCH_CACHE_ROWConstant to be returned by getReason() for rowSetChanged or aboutToChangeRowSet events when one or more rows are being fetched into in the cache.
REASON_INSERT
public static final int REASON_INSERTConstant to be returned by getReason() for rowChanged or aboutToChangeRow events when a row is being inserted in the database.
REASON_NEW_CACHE_ROW
public static final int REASON_NEW_CACHE_ROWConstant to be returned by getReason() for rowSetChanged or aboutToChangeRowSet events when a new empty row is being added to the cache.
REASON_NONE
public static final int REASON_NONEConstant to be returned by getReason() if value is not applicable.
REASON_UPDATE
public static final int REASON_UPDATEConstant to be returned by getReason() for rowChanged or aboutToChangeRow events when a row is being updated in the database.
Constructors
DBEvent
public DBEvent(DBStatement source)Constructs a new DBEvent, without providing a reason code, a modifier, or a sub-modifier.
- Parameters
- source - the object which fired the event
DBEvent
public DBEvent(DBStatement source, int reason)Constructs a new DBEvent, without providing a modifier or a sub-modifier.
- Parameters
- source - the object which fired the event
- reason - the reason the event was fired
- See Also
- REASON_NONE
- REASON_DELETE
- REASON_UPDATE
- REASON_INSERT
- REASON_COLUMN_VALUE
- REASON_NEW_CACHE_ROW
- REASON_DELETE_CACHE_ROW
- REASON_FETCH_CACHE_ROW
- REASON_EXECUTE
DBEvent
public DBEvent(DBStatement source, int reason, int modifier)Constructs a new DBEvent, without providing a sub-modifier.
- Parameters
- source - the object which fired the event
- reason - the reason the event was fired
- modifier - a modifier for the reason the event was fired
- See Also
- REASON_NONE
- REASON_DELETE
- REASON_UPDATE
- REASON_INSERT
- REASON_COLUMN_VALUE
- REASON_NEW_CACHE_ROW
- REASON_DELETE_CACHE_ROW
- REASON_FETCH_CACHE_ROW
- REASON_EXECUTE
- MODIFIER_NONE
DBEvent
public DBEvent(DBStatement source, int reason, int modifier, int subModifier)Constructs a new DBEvent, providing a source, a reason, a modifier, and a sub-modifier.
- Parameters
- source - the object which fired the event
- reason - the reason the event was fired
- modifier - a modifier for the reason the event was fired
- modifier - a sub-modifier for the reason the event was fired
- See Also
- REASON_NONE
- REASON_DELETE
- REASON_UPDATE
- REASON_INSERT
- REASON_COLUMN_VALUE
- REASON_NEW_CACHE_ROW
- REASON_DELETE_CACHE_ROW
- REASON_FETCH_CACHE_ROW
- REASON_EXECUTE
- MODIFIER_NONE
Methods
getModifier
public int getModifier()Returns a modifier amplifying on the reason for the event. In most cases, the modifier is the number of a row in the RowSet. The index of the first row is 1.
- Returns
- the modifier for the event
- See Also
getReason
public int getReason()Returns a code for the reason the event was fired.
- Returns
- the reason for the event
- See Also
- REASON_NONE
- REASON_DELETE
- REASON_UPDATE
- REASON_INSERT
- REASON_COLUMN_VALUE
- REASON_NEW_CACHE_ROW
- REASON_DELETE_CACHE_ROW
- REASON_FETCH_CACHE_ROW
- REASON_EXECUTE
getSubModifier
public int getSubModifier()Returns a sub-modifier amplifying on the reason and modifier for the event. In most cases, the sub-modifier is the number of a column in a row. The index of the first column is 1.
- Returns
- the sub-modifier for the event
- See Also
Class Hierarchy All Classes All Fields and Methods