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 SummaryFieldsModifier and TypeFieldDescriptionstatic final intA type that describes object creation events.static final intA type that describes object modification events.protected DataChannelDescriptorDomain of event object.protected intprotected Stringprotected booleanstatic final intA type that describes object removal events.Fields inherited from class org.apache.cayenne.event.CayenneEventinfo, postedBy, subjectFields inherited from class java.util.EventObjectsource
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintgetId()Returns the id.abstract StringReturns the newName of the object that caused this event.Returns the oldName.booleanvoidsetDomain(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.CayenneEventgetInfo, getPostedBy, getSubject, setPostedBy, setSubjectMethods inherited from class java.util.EventObjectgetSource, toString
- 
Field Details- 
CHANGEpublic 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:
 
- 
ADDpublic static final int ADDA type that describes object creation events.- See Also:
 
- 
REMOVEpublic static final int REMOVEA type that describes object removal events.- See Also:
 
- 
idprotected int id
- 
oldName
- 
oldNameSetprotected boolean oldNameSet
- 
domainDomain of event object. Might be null
 
- 
- 
Constructor Details- 
MapEventConstructor for MapEvent.- Parameters:
- source- event source
 
- 
MapEventConstructor for MapEvent.- Parameters:
- source- event source
 
 
- 
- 
Method Details- 
isNameChangepublic boolean isNameChange()
- 
getIdpublic int getId()Returns the id.- Returns:
- int
 
- 
getNewNameReturns the newName of the object that caused this event.
- 
getOldNameReturns the oldName.
- 
setIdpublic void setId(int id) Sets the id.
- 
setOldNameSets the oldName.
- 
setDomainSets domain of event object.
- 
getDomain- Returns:
- Domain of event object. Might be null
 
 
-