public interface HierarchyService<T extends IHierarchialReference> extends ChangeGenerator<Object[]>
IHierarchialReference
ChangeGenerator
; it will also generate Events of TypeModifier and Type | Method and Description |
---|---|
void |
convert(IHierarchialReference entity,
Class to)
If we wish to transform an entity type we should perform the transformation and then the update.
|
void |
deleteSubHierarchy(T rootNode)
Delete a root node and its children.
May throw an exception is there is a fault in the hierarchy or any node could not be deleted for some reason. |
String |
getLastChildHierarchyCode(T ref)
Get the last existing/current child Hierarchy code
|
List |
loadHierarchy(T rootNode,
boolean loadLeaves) |
List<T> |
loadHierarchyFlat(T rootNode)
Load list of nodes under the root in order of hierarchy but does not to a structural hierarchial conversion (Homogeneous list)
|
void |
move(T node,
T parent,
Integer order)
Move a content under a parent.
|
addChangeListener, getListeners, notifyAllListeners, setListeners
String getLastChildHierarchyCode(T ref)
parentHierarchyCode
- void move(T node, T parent, Integer order) throws Exception
IHierarchialReference.getParentId()
and IHierarchialReference.getHierarchy()
.node
- parent
- @nullable true (if IHierarchialReference.ROOT
order
- as Integer @nullable true (optional)Exception
List loadHierarchy(T rootNode, boolean loadLeaves)
rootNode
- thisloadLeaves
- List<T> loadHierarchyFlat(T rootNode)
rootNode
- void deleteSubHierarchy(T rootNode) throws Exception
rootNode
- Exception
void convert(IHierarchialReference entity, Class to)
InheritanceType.SINGLE_TABLE
or oen where there is a shared DiscriminatorValue
Copyright © 2018. All rights reserved.