java.lang.Object java.util.EventObject com.ibm.db.beans.DBEvent
public class DBEvent
extends EventObject
All 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 | 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 | 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 | 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. |
public static final int MODIFIER_NONEConstant to be returned by getModifier() or getSubModifier() if value is not applicable.
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.
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.
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.
public static final int REASON_EXECUTEConstant to be returned by getReason() for rowSetChanged or aboutToChangeRowSet events when an SQL statement is being executed.
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.
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.
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.
public static final int REASON_NONEConstant to be returned by getReason() if value is not applicable.
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.
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
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
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
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
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
public int getReason()Returns a code for the reason the event was fired.
- Returns
- the reason for the event
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