|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
com.apelon.dts.client.events.DataChangeEvent
public class DataChangeEvent
Defines basic data change event.
| Field Summary | |
|---|---|
static int |
EVENT_TYPE_DELETE
EVENT Type Delete Event ID = 1001 |
static int |
EVENT_TYPE_FIRST
Starts the ID sequence at 1000 for Data Change events. |
static int |
EVENT_TYPE_LAST
Reflects the current end of the ID sequence at EVENT_TYPE_FIRST + 2 for Data change events. |
static int |
EVENT_TYPE_MODIFY
EVENT Type Modify Event ID = 1002 |
static int |
EVENT_TYPE_NEW
New EVENT Type Event ID = 1000 |
static int |
INVALID_TYPE_EVENT
Value of -1 to flag an unitialized or invalid setting for eventType |
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
DataChangeEvent(Object source,
Object data,
int eventType)
Constructs a DataChangeEvent object. |
|
DataChangeEvent(Object source,
Object oldData,
Object newData)
Constructs a DataChangeEvent object. |
|
| Method Summary | |
|---|---|
protected Object |
getChangedData()
Get the data which has changed. |
int |
getEventType()
Get Event Type. |
protected Object |
getNewData()
Get the New Data. |
protected Object |
getOldData()
Get the Old Data. |
| Methods inherited from class java.util.EventObject |
|---|
getSource, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int EVENT_TYPE_FIRST
EVENT_TYPE_NEW,
EVENT_TYPE_MODIFY,
EVENT_TYPE_DELETE,
EVENT_TYPE_LAST,
Constant Field Valuespublic static final int EVENT_TYPE_LAST
EVENT_TYPE_NEW,
EVENT_TYPE_MODIFY,
EVENT_TYPE_DELETE,
EVENT_TYPE_FIRST,
Constant Field Valuespublic static final int EVENT_TYPE_NEW
EVENT_TYPE_DELETE,
EVENT_TYPE_MODIFY,
Constant Field Valuespublic static final int EVENT_TYPE_DELETE
EVENT_TYPE_NEW,
EVENT_TYPE_MODIFY,
Constant Field Valuespublic static final int EVENT_TYPE_MODIFY
EVENT_TYPE_NEW,
EVENT_TYPE_DELETE,
Constant Field Valuespublic static final int INVALID_TYPE_EVENT
eventType
EVENT_TYPE_NEW,
EVENT_TYPE_DELETE,
EVENT_TYPE_MODIFY,
Constant Field Values| Constructor Detail |
|---|
public DataChangeEvent(Object source,
Object oldData,
Object newData)
source - Should be an object that is a valid source of Data Change events.oldData - For adding a new data, the oldData should null;
For updating a data, the oldData should be the data before being updated;
For deleting a data, the oldData should be the data that is deleted.newData - For adding a new data, the newData should be the data that is added;
For updating a data, the newData should be the data after being updated;
For deleting a data, the newData should be null.
public DataChangeEvent(Object source,
Object data,
int eventType)
source - Should be an object that is a valid source of Data Change events.data - The data which has changed. In the case of modifiy, this should be the data after change.eventType - If adding a new data, the eventType should be EVENT_TYPE_NEW
If modifying a data, the eventType should be EVENT_TYPE_MODIFY
If deleting a data, the eventType should be EVENT_TYPE_DELETE| Method Detail |
|---|
public int getEventType()
EVENT_TYPE_NEW,
EVENT_TYPE_MODIFY, or EVENT_TYPE_DELETE.
EVENT_TYPE_NEW;
If the data is updated, return EVENT_TYPE_MODIFY;
If the data is deleted, return EVENT_TYPE_DELETE.protected Object getNewData()
protected Object getOldData()
protected Object getChangedData()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||