Class MapEvent

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
EmbeddableEvent, EntityEvent

public abstract class MapEvent extends CayenneEvent
Superclass of CayenneModeler events.
See Also:
  • Field Details

    • 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:
    • ADD

      public static final int ADD
      A type that describes object creation events.
      See Also:
    • REMOVE

      public static final int REMOVE
      A type that describes object removal events.
      See Also:
    • id

      protected int id
    • oldName

      protected String oldName
    • oldNameSet

      protected boolean oldNameSet
    • domain

      protected DataChannelDescriptor domain
      Domain of event object. Might be null
  • Constructor Details

    • MapEvent

      public MapEvent(Object source)
      Constructor for MapEvent.
      Parameters:
      source - event source
    • MapEvent

      public MapEvent(Object source, String oldName)
      Constructor for MapEvent.
      Parameters:
      source - event source
  • Method Details

    • 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