BrightSide Workbench Full Report + Source Code
org.turro.dossier.dossier.CategoryDossierItem Class Reference
Inheritance diagram for org.turro.dossier.dossier.CategoryDossierItem:
Collaboration diagram for org.turro.dossier.dossier.CategoryDossierItem:

Public Member Functions

 CategoryDossierItem (Object entity, boolean loadOnDemand, boolean knowledgeBase)
 
CategoryDossierTree getTree ()
 
Object getEntity ()
 
void showContents ()
 
void reloadContents ()
 
boolean isLeaf ()
 
CategoryDossierItem addEntity (Object entity, boolean loadOnDemand, boolean knowledgeBase)
 
boolean isLoadOnDemand ()
 
void setLoadOnDemand (boolean loadOnDemand)
 
Collection< Object > getCategoryChildren ()
 
void afterCompose ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 41 of file CategoryDossierItem.java.

Constructor & Destructor Documentation

◆ CategoryDossierItem()

org.turro.dossier.dossier.CategoryDossierItem.CategoryDossierItem ( Object  entity,
boolean  loadOnDemand,
boolean  knowledgeBase 
)

Definition at line 46 of file CategoryDossierItem.java.

46  {
47  super();
48  this.loadOnDemand = loadOnDemand;
49  this.knowledgeBase = knowledgeBase;
50  setValue(entity);
51  setLabel(entity == null ? I_.get("All") : getDescription(entity));
52  setTooltiptext(getLabel());
53  }
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ addEntity()

CategoryDossierItem org.turro.dossier.dossier.CategoryDossierItem.addEntity ( Object  entity,
boolean  loadOnDemand,
boolean  knowledgeBase 
)

Definition at line 96 of file CategoryDossierItem.java.

96  {
97  CategoryDossierItem obj = new CategoryDossierItem(entity, loadOnDemand, knowledgeBase);
98  children.appendChild(obj);
99  obj.afterCompose();
100  return obj;
101  }
CategoryDossierItem(Object entity, boolean loadOnDemand, boolean knowledgeBase)
Here is the call graph for this function:

◆ afterCompose()

void org.turro.dossier.dossier.CategoryDossierItem.afterCompose ( )

Definition at line 166 of file CategoryDossierItem.java.

166  {
167  initLoadOnDemand();
168  addChildrenSpace();
169  }
Here is the caller graph for this function:

◆ getCategoryChildren()

Collection<Object> org.turro.dossier.dossier.CategoryDossierItem.getCategoryChildren ( )

Definition at line 131 of file CategoryDossierItem.java.

131  {
132  boolean all = Application.getApplication().isInRole("dossier:all");
133  ArrayList list = new ArrayList();
134  Dao dao = new DossierPU();
135  WhereClause wc = new WhereClause();
136  wc.addClause("select category from Category as category");
137  if(getEntity() == null) {
138  wc.addClause("where parent is null");
139  } else {
140  wc.addClause("where parent = :category");
141  wc.addNamedValue("category", getEntity());
142  }
143  wc.addClause("order by category.description");
144  for(Object o : dao.getResultList(wc)) {
145  if((knowledgeBase && ((Category) (o)).isKnowledgeBase()) ||
146  (all || new CategoryWrapper((Category) (o)).isChildrenParticipant())) {
147  list.add((Category) o);
148  }
149  }
150  if(getEntity() != null) {
151  wc = new WhereClause();
152  wc.addClause("select dossier from Dossier as dossier");
153  wc.addClause("where category = :category");
154  wc.addNamedValue("category", getEntity());
155  wc.addClause("order by dossier.description");
156  for(Object o : dao.getResultList(wc)) {
157  if(all || new DossierWrapper((Dossier) (o)).isParticipant()) {
158  list.add((Dossier) o);
159  }
160  }
161  }
162  return list;
163  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEntity()

Object org.turro.dossier.dossier.CategoryDossierItem.getEntity ( )

Definition at line 60 of file CategoryDossierItem.java.

60  {
61  return getValue();
62  }
Here is the caller graph for this function:

◆ getTree()

CategoryDossierTree org.turro.dossier.dossier.CategoryDossierItem.getTree ( )

Definition at line 56 of file CategoryDossierItem.java.

56  {
57  return (CategoryDossierTree) super.getTree();
58  }

◆ isLeaf()

boolean org.turro.dossier.dossier.CategoryDossierItem.isLeaf ( )

Definition at line 76 of file CategoryDossierItem.java.

76  {
77  return getEntity() instanceof Dossier || getCategoryChildren().isEmpty();
78  }
Here is the call graph for this function:

◆ isLoadOnDemand()

boolean org.turro.dossier.dossier.CategoryDossierItem.isLoadOnDemand ( )

Definition at line 123 of file CategoryDossierItem.java.

123  {
124  return loadOnDemand;
125  }

◆ reloadContents()

void org.turro.dossier.dossier.CategoryDossierItem.reloadContents ( )

Definition at line 69 of file CategoryDossierItem.java.

69  {
70  if(children != null) {
71  children.getChildren().clear();
72  showContents();
73  }
74  }
Here is the call graph for this function:

◆ setLoadOnDemand()

void org.turro.dossier.dossier.CategoryDossierItem.setLoadOnDemand ( boolean  loadOnDemand)

Definition at line 127 of file CategoryDossierItem.java.

127  {
128  this.loadOnDemand = loadOnDemand;
129  }

◆ showContents()

void org.turro.dossier.dossier.CategoryDossierItem.showContents ( )

Definition at line 64 of file CategoryDossierItem.java.

64  {
65  fillCategory();
66  setOpen(true);
67  }
Here is the caller graph for this function:

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