Class ModificationEvent
java.lang.Object
org.tentackle.session.ModificationEvent
- All Implemented Interfaces:
Serializable
Modification event.
Modification events come in three flavors, which is determined by the corresponding
ModificationListener.
- master: master modification event for any modification
- named event: a single named modification event (usually a table)
- list of named events: modification for more than one name
- Author:
- harald
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionModificationEvent(Session session, long serial) Creates a modification master event.ModificationEvent(Session session, Collection<ModificationEventDetail> details) Creates a modification event. -
Method Summary
Modifier and TypeMethodDescriptionGets the modification detail for a name.Gets the modification details.
Master events provide no details, so listeners can iterate the result unconditionally.getName()Gets the modification name of the first detail.longGets the modification serial of the first detail or master.Gets the session.booleanReturns whether this is a master event.
Master events provide no details.booleanReturns whether this a multi-named event.booleanReturns whether this is a named single event.toString()
-
Constructor Details
-
ModificationEvent
Creates a modification event.- Parameters:
session- the session, never nulldetails- the modification details, one for each name
-
ModificationEvent
Creates a modification master event.- Parameters:
session- the session, never nullserial- the master modification serial
-
-
Method Details
-
getSession
-
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 a single event
-
isMultiEvent
public boolean isMultiEvent()Returns whether this a multi-named event.- Returns:
- true if a multi-named event
-
getSerial
public long getSerial()Gets the modification serial of the first detail or master.- Returns:
- the serial
-
getName
Gets the modification name of the first detail.- Returns:
- the name, null if master event
-
getDetails
Gets the modification details.
Master events provide no details, so listeners can iterate the result unconditionally.- Returns:
- the details, never null, empty if master event
- See Also:
-
getDetail
Gets the modification detail for a name.- Parameters:
name- the name- Returns:
- the detail, null if no such detail or master event
-
toString
-