Class ModificationEvent

  • All Implemented Interfaces:
    java.io.Serializable

    public class ModificationEvent
    extends java.lang.Object
    implements java.io.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:
    Serialized Form
    • Constructor Detail

      • ModificationEvent

        public ModificationEvent​(Session session,
                                 java.util.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 Detail

      • 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 java.lang.String getName()
        Gets the modification name of the first detail.
        Returns:
        the name, null if master event
      • getDetails

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

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object