Hierarchy Class |
Namespace: Aloe.EnterpriseOne.Model.Core.Hierarchies
The Hierarchy type exposes the following members.
Name | Description | |
---|---|---|
![]() | ChangeCodeAndName |
Changes the code and the name of the specified node.
|
![]() | ChangeParent |
Changes the parent of the specified node.
|
![]() | GetDirectSubNodes |
Gets the direct sub-nodes of the specified node.
|
![]() | GetParentNode |
Gets the direct parent node of the specified node.
|
![]() | GetTreeLevel |
Gets the level of deepness of the node within the tree, with the root nodes having a level of 1.
|
![]() | HasSubNodes |
Determines whether the specified node has sub nodes.
|
![]() | IsSubNodeOf |
Determines whether a node is a direct or indirect sub-node of a parent node.
|
![]() | PreloadHierarchy |
Preloads all hierarchy nodes and allows fast hierarchy operations.
|
![]() | TraverseAllSubNodes |
Returns the specified node, and its direct and indirect sub-nodes.
|
Name | Description | |
---|---|---|
![]() | GetRootNodes |
Gets the root nodes of the hierarchy.
(Defined by IHierarchyExtensions.) |
The Hierarchy class provides implementations to some of the non-critical methods in the IHierarchy interface. The implementations of the non-critical methdos are generic, sequential in nature and not performance optimized.
For example, the IsSubNodeOf method simply traverses the parent node chain one by one to find if a node is a parent of another node, which is a O(N) algorithm. Well designed hierarchy providers with optimized storage might be able to provide O(1) algorithm.
Descendant hierarchy providers should choose whether to override all methods or only the critical ones and leave the non-critical methods to the base. It is suggested however, that a well optimized hierarchy provider overrides all methods for which they can provide faster than the default implementation.