Package one.edee.oss.pmptt.model
Class DbHierarchy
- java.lang.Object
-
- one.edee.oss.pmptt.model.Hierarchy
-
- one.edee.oss.pmptt.model.DbHierarchy
-
public class DbHierarchy extends Hierarchy
This implementation stores the hierarchy into the relational database.- Author:
- Jan Novotný (novotny@fg.cz), FG Forrest a.s. (c) 2020
-
-
Constructor Summary
Constructors Constructor Description DbHierarchy(String code, short levels, short sectionSize)DbHierarchy(String code, short levels, short sectionSize, DbHierarchyStorage storage)
-
Method Summary
-
Methods inherited from class one.edee.oss.pmptt.model.Hierarchy
canEqual, equals, getAllChildItems, getChildItems, getCode, getItem, getLeafItems, getLevels, getParentItem, getParentItems, getRootItems, getSectionSize, getStorage, hashCode, printTree, toString
-
-
-
-
Constructor Detail
-
DbHierarchy
public DbHierarchy(String code, short levels, short sectionSize)
-
DbHierarchy
public DbHierarchy(String code, short levels, short sectionSize, DbHierarchyStorage storage)
-
-
Method Detail
-
setStorage
public void setStorage(HierarchyStorage storage)
- Overrides:
setStoragein classHierarchy
-
createRootItem
@Nonnull public HierarchyItem createRootItem(@Nonnull String externalId) throws SectionExhausted
- Overrides:
createRootItemin classHierarchy- Throws:
SectionExhausted
-
createRootItem
@Nonnull public HierarchyItem createRootItem(@Nonnull String externalId, String before) throws PivotHierarchyNodeNotFound, SectionExhausted
- Overrides:
createRootItemin classHierarchy- Throws:
PivotHierarchyNodeNotFoundSectionExhausted
-
createItem
@Nonnull public HierarchyItem createItem(@Nonnull String externalId, @Nonnull String withParent) throws PivotHierarchyNodeNotFound, SectionExhausted, MaxLevelExceeded
- Overrides:
createItemin classHierarchy- Throws:
PivotHierarchyNodeNotFoundSectionExhaustedMaxLevelExceeded
-
createItem
@Nonnull public HierarchyItem createItem(@Nonnull String externalId, @Nonnull String withParent, String before) throws PivotHierarchyNodeNotFound, SectionExhausted, MaxLevelExceeded
- Overrides:
createItemin classHierarchy- Throws:
PivotHierarchyNodeNotFoundSectionExhaustedMaxLevelExceeded
-
removeItem
public void removeItem(@Nonnull String externalId) throws PivotHierarchyNodeNotFound- Overrides:
removeItemin classHierarchy- Throws:
PivotHierarchyNodeNotFound
-
moveItemBetweenLevelsBefore
public void moveItemBetweenLevelsBefore(@Nonnull String externalId, @Nonnull String withParent, @Nonnull String before)- Overrides:
moveItemBetweenLevelsBeforein classHierarchy
-
moveItemBetweenLevelsBefore
public void moveItemBetweenLevelsBefore(@Nonnull String externalId, @Nonnull String before)- Overrides:
moveItemBetweenLevelsBeforein classHierarchy
-
moveItemBetweenLevelsAfter
public void moveItemBetweenLevelsAfter(@Nonnull String externalId, @Nonnull String withParent, @Nonnull String after)- Overrides:
moveItemBetweenLevelsAfterin classHierarchy
-
moveItemBetweenLevelsAfter
public void moveItemBetweenLevelsAfter(@Nonnull String externalId, @Nonnull String after)- Overrides:
moveItemBetweenLevelsAfterin classHierarchy
-
moveItemBetweenLevelsFirst
public void moveItemBetweenLevelsFirst(@Nonnull String externalId)- Overrides:
moveItemBetweenLevelsFirstin classHierarchy
-
moveItemBetweenLevelsFirst
public void moveItemBetweenLevelsFirst(@Nonnull String externalId, @Nonnull String withParent)- Overrides:
moveItemBetweenLevelsFirstin classHierarchy
-
moveItemBetweenLevelsLast
public void moveItemBetweenLevelsLast(@Nonnull String externalId, @Nonnull String withParent)- Overrides:
moveItemBetweenLevelsLastin classHierarchy
-
moveItemBetweenLevelsLast
public void moveItemBetweenLevelsLast(@Nonnull String externalId)- Overrides:
moveItemBetweenLevelsLastin classHierarchy
-
moveItemBefore
public void moveItemBefore(@Nonnull String externalId, @Nonnull String before) throws PivotHierarchyNodeNotFound- Overrides:
moveItemBeforein classHierarchy- Throws:
PivotHierarchyNodeNotFound
-
moveItemAfter
public void moveItemAfter(@Nonnull String externalId, @Nonnull String after) throws PivotHierarchyNodeNotFound- Overrides:
moveItemAfterin classHierarchy- Throws:
PivotHierarchyNodeNotFound
-
moveItemToFirst
public void moveItemToFirst(@Nonnull String externalId) throws PivotHierarchyNodeNotFound- Overrides:
moveItemToFirstin classHierarchy- Throws:
PivotHierarchyNodeNotFound
-
moveItemToLast
public void moveItemToLast(@Nonnull String externalId) throws PivotHierarchyNodeNotFound- Overrides:
moveItemToLastin classHierarchy- Throws:
PivotHierarchyNodeNotFound
-
-