Class EntityEvent

All Implemented Interfaces:
Direct Known Subclasses:
AttributeEvent, RelationshipEvent

public class EntityEvent
extends MapEvent
Represents events resulted from Entity changes in CayenneModeler. This event is used for both ObjEntities and DbEntities.
See Also:
Serialized Form
  • Field Details

    • entity

      protected Entity entity
  • Constructor Details

    • EntityEvent

      public EntityEvent​(Object src, Entity entity)
      Creates a Entity change event.
    • EntityEvent

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

      public EntityEvent​(Object src, Entity entity, String oldName)
      Creates a Entity name change event.
  • Method Details

    • getEntity

      public Entity getEntity()
      Returns entity object associated with this event.
    • setEntity

      public void setEntity​(Entity entity)
      Sets the entity.
      entity - The entity to set
    • getNewName

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