Package de.esoco.data.element
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:
-
Konstruktorübersicht
KonstruktorBeschreibungHierarchicalDataObject
(String id, int index, List<String> values, boolean editable, Collection<String> flags) Creates a new instance without children.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.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.HierarchicalDataObject
(String id, List<String> values) Creates a new readonly instance without children or flags and an index of zero. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfinal void
Clear a certain flag in this instance.boolean
de.esoco.lib.model.DataModel
<de.esoco.lib.model.DataModel<String>> Returns a data model of the children of this data model.getElement
(int index) Returns the data element at a certain position.int
Returns the size of this data model.final Collection
<String> getFlags()
Returns the flags of this object.final String
getId()
Returns the identifier of this instance.int
getIndex()
Returns the index value for this object.final boolean
Checks whether a certain flag is set in this object.int
hashCode()
boolean
Returns the editable state of this object.iterator()
final void
Sets a certain flag in this instance.toString()
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden java.lang.Iterable
forEach, spliterator
-
Konstruktordetails
-
HierarchicalDataObject
Creates a new readonly instance without children or flags and an index of zero.- Parameter:
id
- This object's IDvalues
- 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 IDindex
- The index of this objectvalues
- The attribute valueseditable
- FALSE to mark the instance as readonlyflags
- 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 IDindex
- The index of this objectvalues
- The attribute valueseditable
- FALSE to mark the instance as readonlyflags
- The string flags for the object or NULL for nonechildren
- 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 IDindex
- The index of this objectvalues
- The attribute valueseditable
- FALSE to mark the instance as readonlyflags
- The string flags for the object or NULL for nonechildren
- The child data model (NULL or empty for none)
-
-
Methodendetails
-
clearFlag
Clear a certain flag in this instance.- Parameter:
flag
- The flag to clear
-
equals
-
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 Schnittstellede.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:
-
getElement
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) toDataModel.getElementCount()
- 1, else anIndexOutOfBoundsException
will be thrown.- Angegeben von:
getElement
in Schnittstellede.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:
-
getElementCount
public int getElementCount()Beschreibung aus Schnittstelle kopiert:de.esoco.lib.model.DataModel
Returns the size of this data model.- Angegeben von:
getElementCount
in Schnittstellede.esoco.lib.model.DataModel<String>
- Gibt zurück:
- The number of data elements this model contains
- Siehe auch:
-
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 Schnittstellede.esoco.lib.property.Flags<String>
- Gibt zurück:
- A collection containing the flags
- Siehe auch:
-
getId
Beschreibung aus Schnittstelle kopiert:de.esoco.lib.property.HasId
Returns the identifier of this instance.- Angegeben von:
getId
in Schnittstellede.esoco.lib.property.HasId<String>
- Gibt zurück:
- The instance identifier
- Siehe auch:
-
getIndex
public int getIndex()Returns the index value for this object.- Angegeben von:
getIndex
in Schnittstellede.esoco.lib.property.Indexed
- Gibt zurück:
- The object's index
-
hasFlag
Beschreibung aus Schnittstelle kopiert:de.esoco.lib.property.Flags
Checks whether a certain flag is set in this object.- Angegeben von:
hasFlag
in Schnittstellede.esoco.lib.property.Flags<String>
- Parameter:
flag
- The flag to check- Gibt zurück:
- TRUE if the flag is set
- Siehe auch:
-
hashCode
public int hashCode() -
isEditable
public boolean isEditable()Beschreibung aus Schnittstelle kopiert:de.esoco.lib.property.Editable
Returns the editable state of this object.- Angegeben von:
isEditable
in Schnittstellede.esoco.lib.property.Editable
- Gibt zurück:
- TRUE if the object can be edited, FALSE if it is readonly
- Siehe auch:
-
iterator
-
setFlag
Sets a certain flag in this instance.- Parameter:
flag
- The flag to set
-
toString
-