Package org.apache.cayenne.map.event
Class RelationshipEvent
java.lang.Object
java.util.EventObject
org.apache.cayenne.event.CayenneEvent
org.apache.cayenne.map.event.MapEvent
org.apache.cayenne.map.event.EntityEvent
org.apache.cayenne.map.event.RelationshipEvent
- All Implemented Interfaces:
Serializable
Represents events resulted from Relationship changes
in CayenneModeler. This event is used for both ObjRelationships
and DbRelationships.
- See Also:
-
Field Summary
FieldsFields inherited from class org.apache.cayenne.map.event.EntityEvent
entity
Fields inherited from class org.apache.cayenne.map.event.MapEvent
ADD, CHANGE, domain, id, oldName, oldNameSet, REMOVE
Fields inherited from class org.apache.cayenne.event.CayenneEvent
info, postedBy, subject
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionRelationshipEvent
(Object src, Relationship rel, Entity entity) Creates a Relationship change event.RelationshipEvent
(Object src, Relationship rel, Entity entity, int id) Creates a Relationship event of a specified type.RelationshipEvent
(Object src, Relationship rel, Entity entity, String oldName) Creates a Relationship name change event. -
Method Summary
Modifier and TypeMethodDescriptionReturns the newName of the object that caused this event.Returns relationship associated with this event.void
setRelationship
(Relationship relationship) Sets relationship associated with this event.Methods inherited from class org.apache.cayenne.map.event.EntityEvent
getEntity, setEntity
Methods inherited from class org.apache.cayenne.map.event.MapEvent
getDomain, getId, getOldName, isNameChange, setDomain, setId, setOldName
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
-
relationship
-
-
Constructor Details
-
RelationshipEvent
Creates a Relationship change event. -
RelationshipEvent
Creates a Relationship event of a specified type. -
RelationshipEvent
Creates a Relationship name change event.
-
-
Method Details
-
getRelationship
Returns relationship associated with this event. -
setRelationship
Sets relationship associated with this event.- Parameters:
relationship
- The relationship to set
-
getNewName
Description copied from class:MapEvent
Returns the newName of the object that caused this event.- Overrides:
getNewName
in classEntityEvent
-