Class ModificationEvent

java.lang.Object
org.tentackle.session.ModificationEvent
All Implemented Interfaces:
Serializable

public class ModificationEvent extends Object implements Serializable
Modification event.

Modification events come in three flavors, which is determined by the corresponding ModificationListener.

  1. master: master modification event for any modification
  2. named event: a single named modification event (usually a table)
  3. list of named events: modification for more than one name
Author:
harald
See Also:
  • Constructor Details

    • ModificationEvent

      public ModificationEvent(Session session, Collection<ModificationEventDetail> details)
      Creates a modification event.
      Parameters:
      session - the session, never null
      details - the modification details, one for each name
    • ModificationEvent

      public ModificationEvent(Session session, long serial)
      Creates a modification master event.
      Parameters:
      session - the session, never null
      serial - the master modification serial
  • Method Details

    • getSession

      public Session getSession()
      Gets the session.
      Returns:
      the session
    • isMasterEvent

      public boolean isMasterEvent()
      Returns whether this is a master event.
      Master events provide no details.
      Returns:
      true if master event
    • isSingleEvent

      public boolean isSingleEvent()
      Returns whether this is a named single event.
      Returns:
      true if single event
    • isMultiEvent

      public boolean isMultiEvent()
      Returns whether this a multi named event.
      Returns:
      true if multi event
    • getSerial

      public long getSerial()
      Gets the modification serial of the first detail or master.
      Returns:
      the serial
    • getName

      public String getName()
      Gets the modification name of the first detail.
      Returns:
      the name, null if master event
    • getDetails

      public Collection<ModificationEventDetail> getDetails()
      Gets the modification details.
      Returns:
      the details, null if master event
    • getDetail

      public ModificationEventDetail getDetail(String name)
      Gets the modification detail for a name.
      Parameters:
      name - the name
      Returns:
      the detail, null if no such detail
    • toString

      public String toString()
      Overrides:
      toString in class Object