Click or drag to resize

Hierarchy Class

Provides base class for implementing IHierarchy providers.
Inheritance Hierarchy

Namespace:  Aloe.EnterpriseOne.Model.Core.Hierarchies
Assembly:  Aloe.EnterpriseOne.Model (in Aloe.EnterpriseOne.Model.dll) Version: 20.1.3.5
Syntax
public abstract class Hierarchy : IHierarchy

The Hierarchy type exposes the following members.

Methods
  NameDescription
Public methodChangeCodeAndName
Changes the code and the name of the specified node.
Public methodChangeParent
Changes the parent of the specified node.
Public methodGetDirectSubNodes
Gets the direct sub-nodes of the specified node.
Public methodGetParentNode
Gets the direct parent node of the specified node.
Public methodGetTreeLevel
Gets the level of deepness of the node within the tree, with the root nodes having a level of 1.
Public methodHasSubNodes
Determines whether the specified node has sub nodes.
Public methodIsSubNodeOf
Determines whether a node is a direct or indirect sub-node of a parent node.
Public methodPreloadHierarchy
Preloads all hierarchy nodes and allows fast hierarchy operations.
Public methodTraverseAllSubNodes
Returns the specified node, and its direct and indirect sub-nodes.
Top
Extension Methods
  NameDescription
Public Extension MethodGetRootNodes
Gets the root nodes of the hierarchy.
(Defined by IHierarchyExtensions.)
Top
Remarks

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.

See Also