18 package org.turro.dossier.zul.dossier;
20 import java.util.List;
21 import org.turro.dossier.db.DossierPU;
22 import org.turro.dossier.entity.Dossier;
23 import org.turro.dossier.entity.IssueParticipantRole;
24 import org.turro.dossier.entity.IssueStatus;
25 import org.turro.elephant.db.WhereClause;
26 import org.turro.i18n.I_;
27 import org.turro.jpa.Dao;
28 import org.zkoss.zul.SimplePieModel;
37 private String issueParticipant;
47 this.issueParticipant = issueParticipant;
52 this.dossier = dossier;
56 private void readValues() {
59 wc.
addClause(
"select issue.status, count(distinct issue.id)");
61 wc.
addClause(
"left outer join issue.participants participant");
62 wc.
addClause(
"where issue.dossier = :dossier");
63 if(issueParticipant !=
null) {
64 wc.
addClause(
"and participant.idContact = :idContact");
65 wc.
addClause(
"and participant.role = :role");
71 List<Object[]> l = dao.getResultList(wc);
72 for(Object[] result : l) {
73 setValue(I_.byKey(((IssueStatus) result[0]).toString()),
void setDossier(Dossier dossier)
IssueStatusModel(Dossier dossier, String issueParticipant)
IssueStatusModel(Dossier dossier)
void addClause(String clause)
void addNamedValue(String name, Object value)