01: package org.osbl.persistence.logic;
02:
03: import org.osbl.persistence.model.TreeEntity;
04: import org.osbl.persistence.model.TreeNodeEntity;
05:
06: import java.util.List;
07:
08: public interface TreeLogic<T extends TreeEntity, N extends TreeNodeEntity> {
09: List<T> trees();
10:
11: T tree(String key);
12:
13: List<N> roots();
14:
15: List<N> roots(Long tree);
16:
17: List<N> children(Long tree, Long costType);
18:
19: List<N> descendants(Long tree, Long costTypeKey);
20:
21: List<N> ancestors(Long tree, Long object);
22:
23: List<N> all(Long tree);
24:
25: N byPath(String path);
26:
27: void connectNodeToNode(N parentTreeNode, N childTreeNode);
28:
29: void connectNodeToTree(T tree, N treeNode);
30: }
|