Class RelationshipEvent

  • All Implemented Interfaces:
    Serializable

    public class RelationshipEvent
    extends EntityEvent
    Represents events resulted from Relationship changes in CayenneModeler. This event is used for both ObjRelationships and DbRelationships.
    See Also:
    Serialized Form
    • Constructor Detail

      • RelationshipEvent

        public RelationshipEvent​(Object src,
                                 Relationship rel,
                                 Entity entity)
        Creates a Relationship change event.
      • RelationshipEvent

        public RelationshipEvent​(Object src,
                                 Relationship rel,
                                 Entity entity,
                                 int id)
        Creates a Relationship event of a specified type.
      • RelationshipEvent

        public RelationshipEvent​(Object src,
                                 Relationship rel,
                                 Entity entity,
                                 String oldName)
        Creates a Relationship name change event.
    • Method Detail

      • getRelationship

        public Relationship getRelationship()
        Returns relationship associated with this event.
      • setRelationship

        public void setRelationship​(Relationship relationship)
        Sets relationship associated with this event.
        Parameters:
        relationship - The relationship to set
      • getNewName

        public String getNewName()
        Description copied from class: MapEvent
        Returns the newName of the object that caused this event.
        Overrides:
        getNewName in class EntityEvent