Class SuperRootRow
- All Implemented Interfaces:
StructureRow
The super-root is a fictional row that is present in every forest as the parent of all root rows.
SuperRootRow
class is the representation of the super-root row.
Super-root is a concept with limited application; as of now, it can only be used in StructureAttributeService
for calculating totals
for the whole forest.
The super-root row has row ID of -1
. This row ID is reserved and must not be used for any other purpose. Creating a Forest
with row ID -1
will result in exception.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface StructureRow
StructureRow.ZeroRow
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Super-root's depth in a forest.static final int
Super-root's index in an array of forest rows.static final ItemIdentity
AnItemIdentity
of the item in the super-root.static final String
A special item type for the super-root item.static final SuperRootRow
A single instance of the super-rootStructureRow
.static final long
Super-root's row ID.static final long
A special semantics of the super-root.Fields inherited from interface StructureRow
ROW_ZERO
-
Method Summary
-
Field Details
-
SUPER_ROOT_ROW_ID
public static final long SUPER_ROOT_ROW_IDSuper-root's row ID. This ID is reserved and may not be used for any other rows.- See Also:
-
SUPER_ROOT_ROW
A single instance of the super-rootStructureRow
. -
SUPER_ROOT_ITEM_TYPE
A special item type for the super-root item.- See Also:
-
SUPER_ROOT_ITEM
AnItemIdentity
of the item in the super-root. -
SUPER_ROOT_SEMANTICS
public static final long SUPER_ROOT_SEMANTICSA special semantics of the super-root.- See Also:
-
SUPER_ROOT_INDEX
@Internal public static final int SUPER_ROOT_INDEXSuper-root's index in an array of forest rows. Since it is a fictional row, the index is also fictional. Don't use it outside the attribute system.- See Also:
-
SUPER_ROOT_DEPTH
@Internal public static final int SUPER_ROOT_DEPTHSuper-root's depth in a forest. Since it is a fictional row, the depth is also fictional. Don't use it outside the attribute system.- See Also:
-
-
Method Details
-
getRowId
public long getRowId()Description copied from interface:StructureRow
Returns row ID, a positive number.- Specified by:
getRowId
in interfaceStructureRow
-
getItemId
Description copied from interface:StructureRow
Returns item ID for the item shown in this row.- Specified by:
getItemId
in interfaceStructureRow
-
getSemantics
public long getSemantics()Description copied from interface:StructureRow
Returns row's semantics.- Specified by:
getSemantics
in interfaceStructureRow
-
getItem
Description copied from interface:StructureRow
Tries to resolve the item based on its ID, that is, get an object that represents this item. Resolution includes checking the current user's access to that item, unless the row is created with an additional flag indicating that the access check should be skipped.
This method may return
null
in many different cases:- The item does not exist.
- The item is not accessible by the current user.
- The instance of
StructureRow
was created with theItemAccessMode.ITEM_NOT_NEEDED
flag. - The plugin module that is responsible for this type of items is disabled or missing.
- Item's object type is not reducible to
itemClass
.
- Specified by:
getItem
in interfaceStructureRow
- Type Parameters:
I
- type of item's objects- Parameters:
itemClass
- expected class of the item's object- Returns:
- the item's object, or
null
-
toString
-