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
public abstract class MapEvent extends CayenneEvent
Superclass of CayenneModeler events.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intADDA type that describes object creation events.static intCHANGEA type that describes object modification events.protected DataChannelDescriptordomainDomain of event object.protected intidprotected StringoldNameprotected booleanoldNameSetstatic intREMOVEA 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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description DataChannelDescriptorgetDomain()intgetId()Returns the id.abstract StringgetNewName()Returns the newName of the object that caused this event.StringgetOldName()Returns the oldName.booleanisNameChange()voidsetDomain(DataChannelDescriptor domain)Sets domain of event object.voidsetId(int id)Sets the id.voidsetOldName(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 Detail
-
CHANGE
public static final int CHANGE
A type that describes object modification events. CHANGE is a default type of new MapEvents, unless the type is specified explicitly.- See Also:
- Constant Field Values
-
ADD
public static final int ADD
A type that describes object creation events.- See Also:
- Constant Field Values
-
REMOVE
public static final int REMOVE
A type that describes object removal events.- See Also:
- Constant Field Values
-
id
protected int id
-
oldName
protected String oldName
-
oldNameSet
protected boolean oldNameSet
-
domain
protected DataChannelDescriptor domain
Domain of event object. Might be null
-
-
Method Detail
-
isNameChange
public boolean isNameChange()
-
getId
public int getId()
Returns the id.- Returns:
- int
-
getNewName
public abstract String getNewName()
Returns the newName of the object that caused this event.
-
getOldName
public String getOldName()
Returns the oldName.
-
setId
public void setId(int id)
Sets the id.
-
setOldName
public void setOldName(String oldName)
Sets the oldName.
-
setDomain
public void setDomain(DataChannelDescriptor domain)
Sets domain of event object.
-
getDomain
public DataChannelDescriptor getDomain()
- Returns:
- Domain of event object. Might be null
-
-