Package org.apache.cayenne.map.event
Class MapEvent
java.lang.Object
java.util.EventObject
org.apache.cayenne.event.CayenneEvent
org.apache.cayenne.map.event.MapEvent
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
EmbeddableEvent
,EntityEvent
Superclass of CayenneModeler events.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
A type that describes object creation events.static final int
A type that describes object modification events.protected DataChannelDescriptor
Domain of event object.protected int
protected String
protected boolean
static final int
A type that describes object removal events.Fields inherited from class org.apache.cayenne.event.CayenneEvent
info, postedBy, subject
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getId()
Returns the id.abstract String
Returns the newName of the object that caused this event.Returns the oldName.boolean
void
setDomain
(DataChannelDescriptor domain) Sets domain of event object.void
setId
(int id) Sets the id.void
setOldName
(String oldName) Sets the oldName.Methods inherited from class org.apache.cayenne.event.CayenneEvent
getInfo, getPostedBy, getSubject, setPostedBy, setSubject
Methods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
CHANGE
public static final int CHANGEA type that describes object modification events. CHANGE is a default type of new MapEvents, unless the type is specified explicitly.- See Also:
-
ADD
public static final int ADDA type that describes object creation events.- See Also:
-
REMOVE
public static final int REMOVEA type that describes object removal events.- See Also:
-
id
protected int id -
oldName
-
oldNameSet
protected boolean oldNameSet -
domain
Domain of event object. Might be null
-
-
Constructor Details
-
MapEvent
Constructor for MapEvent.- Parameters:
source
- event source
-
MapEvent
Constructor for MapEvent.- Parameters:
source
- event source
-
-
Method Details
-
isNameChange
public boolean isNameChange() -
getId
public int getId()Returns the id.- Returns:
- int
-
getNewName
Returns the newName of the object that caused this event. -
getOldName
Returns the oldName. -
setId
public void setId(int id) Sets the id. -
setOldName
Sets the oldName. -
setDomain
Sets domain of event object. -
getDomain
- Returns:
- Domain of event object. Might be null
-