Class Hierarchy All Classes All Fields and Methods

 

Class com.ibm.db.beans.DBEvent

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 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_NONE

Constant to be returned by getModifier() or getSubModifier() if value is not applicable.

 

REASON_COLUMN_VALUE

public static final int 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

public static final int 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

public static final int 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

public static final int REASON_EXECUTE

Constant 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_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

public static final int 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

public static final int 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

public static final int REASON_NONE

Constant to be returned by getReason() if value is not applicable.

 

REASON_UPDATE

public static final int REASON_UPDATE

Constant 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.

 

DBEvent

public DBEvent(DBStatement source,
               int reason) 

Constructs a new DBEvent, without providing a modifier or a sub-modifier.

 

DBEvent

public DBEvent(DBStatement source,
               int reason,
               int modifier) 

Constructs a new DBEvent, without providing a sub-modifier.

 

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.

 

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.

 

getReason

public int getReason() 

Returns a code for the reason the event was fired.

 

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.

Class Hierarchy All Classes All Fields and Methods