Klasse HierarchicalDataObject

java.lang.Object
de.esoco.data.element.HierarchicalDataObject
Alle implementierten Schnittstellen:
de.esoco.lib.model.DataModel<String>, de.esoco.lib.model.HierarchicalDataModel<String>, de.esoco.lib.property.Editable, de.esoco.lib.property.Flags<String>, de.esoco.lib.property.HasId<String>, de.esoco.lib.property.Indexed, Serializable, Iterable<String>

public class HierarchicalDataObject extends Object implements de.esoco.lib.model.HierarchicalDataModel<String>, de.esoco.lib.property.HasId<String>, de.esoco.lib.property.Flags<String>, de.esoco.lib.property.Indexed, de.esoco.lib.property.Editable, Serializable
A simple hierarchical data object to efficiently transfer query data between client and server. An object contains a list of string values and references to parent and child objects. It also implements HierarchicalDataModel so that it can be used directly in UI components.
Siehe auch:
  • Konstruktordetails

    • HierarchicalDataObject

      public HierarchicalDataObject(String id, List<String> values)
      Creates a new readonly instance without children or flags and an index of zero.
      Parameter:
      id - This object's ID
      values - The attribute values
    • HierarchicalDataObject

      public HierarchicalDataObject(String id, int index, List<String> values, boolean editable, Collection<String> flags)
      Creates a new instance without children. The reference arguments will not be copied but will be used directly.
      Parameter:
      id - The object's ID
      index - The index of this object
      values - The attribute values
      editable - FALSE to mark the instance as readonly
      flags - The string flags for the object or NULL for none
    • HierarchicalDataObject

      public HierarchicalDataObject(String id, int index, List<String> values, boolean editable, Collection<String> flags, List<de.esoco.lib.model.DataModel<String>> children)
      Creates a new instance. The reference arguments will not be copied but will be used directly.
      Parameter:
      id - The object's ID
      index - The index of this object
      values - The attribute values
      editable - FALSE to mark the instance as readonly
      flags - The string flags for the object or NULL for none
      children - The list of child objects (NULL or empty for none)
    • HierarchicalDataObject

      public HierarchicalDataObject(String id, int index, List<String> values, boolean editable, Collection<String> flags, de.esoco.lib.model.DataModel<de.esoco.lib.model.DataModel<String>> children)
      Creates a new instance. The reference arguments will not be copied but will be used directly.
      Parameter:
      id - The object's ID
      index - The index of this object
      values - The attribute values
      editable - FALSE to mark the instance as readonly
      flags - The string flags for the object or NULL for none
      children - The child data model (NULL or empty for none)
  • Methodendetails

    • clearFlag

      public final void clearFlag(String flag)
      Clear a certain flag in this instance.
      Parameter:
      flag - The flag to clear
    • equals

      public boolean equals(Object object)
      Setzt außer Kraft:
      equals in Klasse Object
      Siehe auch:
    • getChildModels

      public de.esoco.lib.model.DataModel<de.esoco.lib.model.DataModel<String>> getChildModels()
      Beschreibung aus Schnittstelle kopiert: de.esoco.lib.model.HierarchicalDataModel
      Returns a data model of the children of this data model.
      Angegeben von:
      getChildModels in Schnittstelle de.esoco.lib.model.HierarchicalDataModel<String>
      Gibt zurück:
      A list of this model's children (may be NULL or empty if no children exists)
      Siehe auch:
      • HierarchicalDataModel.getChildModels()
    • getElement

      public String getElement(int index)
      Beschreibung aus Schnittstelle kopiert: de.esoco.lib.model.DataModel
      Returns the data element at a certain position. The position index must be in the range from 0 (zero) to DataModel.getElementCount() - 1, else an IndexOutOfBoundsException will be thrown.
      Angegeben von:
      getElement in Schnittstelle de.esoco.lib.model.DataModel<String>
      Parameter:
      index - The position of the element to return
      Gibt zurück:
      The data element at the given position
      Siehe auch:
      • DataModel.getElement(int)
    • getElementCount

      public int getElementCount()
      Beschreibung aus Schnittstelle kopiert: de.esoco.lib.model.DataModel
      Returns the size of this data model.
      Angegeben von:
      getElementCount in Schnittstelle de.esoco.lib.model.DataModel<String>
      Gibt zurück:
      The number of data elements this model contains
      Siehe auch:
      • DataModel.getElementCount()
    • getFlags

      public final Collection<String> getFlags()
      Beschreibung aus Schnittstelle kopiert: de.esoco.lib.property.Flags
      Returns the flags of this object. The returned collection may be empty but will never be NULL.
      Angegeben von:
      getFlags in Schnittstelle de.esoco.lib.property.Flags<String>
      Gibt zurück:
      A collection containing the flags
      Siehe auch:
      • Flags.getFlags()
    • getId

      public final String getId()
      Beschreibung aus Schnittstelle kopiert: de.esoco.lib.property.HasId
      Returns the identifier of this instance.
      Angegeben von:
      getId in Schnittstelle de.esoco.lib.property.HasId<String>
      Gibt zurück:
      The instance identifier
      Siehe auch:
      • HasId.getId()
    • getIndex

      public int getIndex()
      Returns the index value for this object.
      Angegeben von:
      getIndex in Schnittstelle de.esoco.lib.property.Indexed
      Gibt zurück:
      The object's index
    • hasFlag

      public final boolean hasFlag(String flag)
      Beschreibung aus Schnittstelle kopiert: de.esoco.lib.property.Flags
      Checks whether a certain flag is set in this object.
      Angegeben von:
      hasFlag in Schnittstelle de.esoco.lib.property.Flags<String>
      Parameter:
      flag - The flag to check
      Gibt zurück:
      TRUE if the flag is set
      Siehe auch:
      • Flags.hasFlag(Object)
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
      Siehe auch:
    • isEditable

      public boolean isEditable()
      Beschreibung aus Schnittstelle kopiert: de.esoco.lib.property.Editable
      Returns the editable state of this object.
      Angegeben von:
      isEditable in Schnittstelle de.esoco.lib.property.Editable
      Gibt zurück:
      TRUE if the object can be edited, FALSE if it is readonly
      Siehe auch:
      • Editable.isEditable()
    • iterator

      public Iterator<String> iterator()
      Angegeben von:
      iterator in Schnittstelle Iterable<String>
      Siehe auch:
    • setFlag

      public final void setFlag(String flag)
      Sets a certain flag in this instance.
      Parameter:
      flag - The flag to set
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
      Siehe auch: