19 package org.turro.jpa.iterator;
21 import java.util.List;
22 import org.turro.collections.Item;
23 import org.turro.collections.Tree;
24 import org.turro.elephant.db.WhereClause;
25 import org.turro.jpa.Dao;
33 public abstract class DaoTree<E, ID>
extends Tree<E, ID> {
48 if(childrenClause !=
null) {
49 for(E e : (List<E>)
dao.getResultList(childrenClause)) {
51 Item i = addRoot(e, getId(e));
59 if(leafClause !=
null) {
60 for(E e : (List<E>)
dao.getResultList(leafClause)) {
70 if(childrenClause !=
null) {
71 for(E e : (List<E>)
dao.getResultList(childrenClause)) {
73 Item i = item.addChild(
this, item, e, getId(e));
79 if(leafClause !=
null) {
80 for(E e : (List<E>)
dao.getResultList(leafClause)) {
82 item.addLeaf(
this, item, e, getId(e));
void fillTree(String path)
abstract WhereClause getChildrenClause(String currPath)
abstract WhereClause getLeafClause(String currPath)