com.vaadin.signals.

Record Class Node.Data

java.lang.Object
java.lang.Record
com.vaadin.signals.Node.Data

Record Components:

parent - the parent id, or null for the root node

lastUpdate - a unique id for the update that last updated this data node, not null

scopeOwner - the id of the external owner of this node, or null if the node has no owner. Any node with an owner is deleted if the owner is disconnected.

value - the JSON value of this node, or null if there is no value

listChildren - a list of child ids, or an empty list if the node has no list children

mapChildren - a sequenced map from key to child id, or an empty map if the node has no map children

All Implemented Interfaces:

Node

Enclosing interface:

Node

public static record Node.Data(Id parent, Id lastUpdate, Id scopeOwner, com.fasterxml.jackson.databind.JsonNode value, List<Id> listChildren, Map<String,Id> mapChildren) extends Record implements Node

A data node. The node represents the actual data behind a signal instance. The value of a node is made up of three different components:

  • a leaf value for when the node is used as a value signal
  • a list of children for when the node is used as a list signal
  • a map of children for when the node is used as a map signal
Note that a child is always either a list child or a map child. A child cannot have a list position and a map key at the same time.

  • Constructor Details

    • Data

      public Data(Id parent, Id lastUpdate, Id scopeOwner, com.fasterxml.jackson.databind.JsonNode value, List<Id> listChildren, Map<String,Id> mapChildren)

      Creates a new data node.

      Parameters:

      parent - the parent id, or null for the root node

      lastUpdate - a unique id for the update that last updated this data node, not null

      scopeOwner - the id of the external owner of this node, or null if the node has no owner. Any node with an owner is deleted if the owner is disconnected.

      value - the JSON value of this node, or null if there is no value

      listChildren - a list of child ids, or an empty list if the node has no list children

      mapChildren - a sequenced map from key to child id, or an empty map if the node has no map children

  • Method Details

    • 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.

    • parent

      public Id parent()

      Returns the value of the parent record component.

      Returns:

      the value of the parent record component

    • lastUpdate

      public Id lastUpdate()

      Returns the value of the lastUpdate record component.

      Returns:

      the value of the lastUpdate record component

    • scopeOwner

      public Id scopeOwner()

      Returns the value of the scopeOwner record component.

      Returns:

      the value of the scopeOwner record component

    • value

      public com.fasterxml.jackson.databind.JsonNode value()

      Returns the value of the value record component.

      Returns:

      the value of the value record component

    • listChildren

      public List<Id> listChildren()

      Returns the value of the listChildren record component.

      Returns:

      the value of the listChildren record component

    • mapChildren

      public Map<String,Id> mapChildren()

      Returns the value of the mapChildren record component.

      Returns:

      the value of the mapChildren record component