BrightSide Workbench Full Report + Source Code
org.turro.jpa.iterator.DaoTree< E, ID > Class Template Referenceabstract
Inheritance diagram for org.turro.jpa.iterator.DaoTree< E, ID >:
Collaboration diagram for org.turro.jpa.iterator.DaoTree< E, ID >:

Public Member Functions

 DaoTree (Dao dao)
 
Dao getDao ()
 
void fillTree (String path)
 
void fillRoot (Item item)
 

Protected Member Functions

abstract WhereClause getChildrenClause (String currPath)
 
abstract WhereClause getLeafClause (String currPath)
 

Protected Attributes

Dao dao
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Parameters
<E>
<ID>

Definition at line 33 of file DaoTree.java.

Constructor & Destructor Documentation

◆ DaoTree()

Definition at line 37 of file DaoTree.java.

37  {
38  this.dao = dao;
39  }

Member Function Documentation

◆ fillRoot()

void org.turro.jpa.iterator.DaoTree< E, ID >.fillRoot ( Item  item)

Definition at line 68 of file DaoTree.java.

68  {
69  WhereClause childrenClause = getChildrenClause(item.getPath());
70  if(childrenClause != null) {
71  for(E e : (List<E>) dao.getResultList(childrenClause)) {
72  if(e != null) {
73  Item i = item.addChild(this, item, e, getId(e));
74  fillRoot(i);
75  }
76  }
77  }
78  WhereClause leafClause = getLeafClause(item.getPath());
79  if(leafClause != null) {
80  for(E e : (List<E>) dao.getResultList(leafClause)) {
81  if(e != null) {
82  item.addLeaf(this, item, e, getId(e));
83  }
84  }
85  }
86  }
void fillRoot(Item item)
Definition: DaoTree.java:68
abstract WhereClause getChildrenClause(String currPath)
abstract WhereClause getLeafClause(String currPath)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fillTree()

void org.turro.jpa.iterator.DaoTree< E, ID >.fillTree ( String  path)

Definition at line 45 of file DaoTree.java.

45  {
46  setPath(path);
47  WhereClause childrenClause = getChildrenClause(path);
48  if(childrenClause != null) {
49  for(E e : (List<E>) dao.getResultList(childrenClause)) {
50  if(e != null) {
51  Item i = addRoot(e, getId(e));
52  if(i != null) {
53  fillRoot(i);
54  }
55  }
56  }
57  }
58  WhereClause leafClause = getLeafClause(path);
59  if(leafClause != null) {
60  for(E e : (List<E>) dao.getResultList(leafClause)) {
61  if(e != null) {
62  addLeaf(e, getId(e));
63  }
64  }
65  }
66  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getChildrenClause()

abstract WhereClause org.turro.jpa.iterator.DaoTree< E, ID >.getChildrenClause ( String  currPath)
abstractprotected

◆ getDao()

Dao org.turro.jpa.iterator.DaoTree< E, ID >.getDao ( )

Definition at line 41 of file DaoTree.java.

41  {
42  return dao;
43  }
Here is the caller graph for this function:

◆ getLeafClause()

abstract WhereClause org.turro.jpa.iterator.DaoTree< E, ID >.getLeafClause ( String  currPath)
abstractprotected

Member Data Documentation

◆ dao

Dao org.turro.jpa.iterator.DaoTree< E, ID >.dao
protected

Definition at line 35 of file DaoTree.java.


The documentation for this class was generated from the following file: