Record Class ClusterEvent.EntityChanged

java.lang.Object
java.lang.Record
su.onno.cluster.ClusterEvent.EntityChanged
Record Components:
originNodeId - the publishing node's id, or null before a bus stamps it.
changeType - created/updated/deleted/posted/unposted/changed.
entityType - catalog/document/register.
entityName - the entity's logical name, or * for a non-specific signal.
id - the affected row's id as a string, or null.
naturalKey - the business key (catalog code / document number), or null.
All Implemented Interfaces:
ClusterEvent
Enclosing interface:
ClusterEvent

public static record ClusterEvent.EntityChanged(String originNodeId, String changeType, String entityType, String entityName, String id, String naturalKey) extends Record implements ClusterEvent
An entity create/update/delete/post notice mirroring the fields of su.onno.events.EntityChangedEvent. A best-effort live-UI signal: a peer that misses one re-fetches the affected surface on its next interaction.
  • Constructor Details

    • EntityChanged

      public EntityChanged(String originNodeId, String changeType, String entityType, String entityName, String id, String naturalKey)
      Creates an instance of a EntityChanged record class.
      Parameters:
      originNodeId - the value for the originNodeId record component
      changeType - the value for the changeType record component
      entityType - the value for the entityType record component
      entityName - the value for the entityName record component
      id - the value for the id record component
      naturalKey - the value for the naturalKey record component
  • Method Details

    • kind

      public String kind()
      Description copied from interface: ClusterEvent
      The payload-shape tag identifying which permitted variant this event is.
      Specified by:
      kind in interface ClusterEvent
    • withOrigin

      public ClusterEvent.EntityChanged withOrigin(String originNodeId)
      Description copied from interface: ClusterEvent
      A copy of this event with ClusterEvent.originNodeId() set — used by a bus to stamp its identity on send.
      Specified by:
      withOrigin in interface ClusterEvent
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • originNodeId

      public String originNodeId()
      Returns the value of the originNodeId record component.
      Specified by:
      originNodeId in interface ClusterEvent
      Returns:
      the value of the originNodeId record component
    • changeType

      public String changeType()
      Returns the value of the changeType record component.
      Returns:
      the value of the changeType record component
    • entityType

      public String entityType()
      Returns the value of the entityType record component.
      Returns:
      the value of the entityType record component
    • entityName

      public String entityName()
      Returns the value of the entityName record component.
      Returns:
      the value of the entityName record component
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • naturalKey

      public String naturalKey()
      Returns the value of the naturalKey record component.
      Returns:
      the value of the naturalKey record component