18 package org.turro.dossier.search;
20 import java.util.Date;
21 import org.turro.contacts.Contact;
22 import org.turro.dossier.db.DossierPU;
23 import org.turro.dossier.entity.Dossier;
24 import org.turro.dossier.entity.ParticipantRole;
25 import org.turro.elephant.db.WhereClause;
26 import org.turro.jpa.Dao;
34 private boolean ckRegistered =
false;
37 private Date fromDate =
new Date(
new Date().getTime() - (90L * 24L * 60L * 60L * 1000L));
45 wc.
addClause(
"select distinct comment from IssueComment as comment");
46 wc.
addClause(
"left join comment.issue.dossier.participants participant");
47 wc.
addClause(
"where (comment.expenses <> 0 or comment.hours <> 0 or comment.price <> 0)");
49 wc.
addClause(
"order by comment.modification");
50 return dao.getResultList(wc);
54 if(subject ==
null && dossier ==
null) {
59 wc.
addClause(
"and comment.processed = :processed");
62 if(fromDate !=
null) {
63 wc.
addClause(
"and comment.modification >= :modification");
69 wc.
addClause(
"participant.idContact = :idContact");
71 wc.
addClause(
"and participant.role = :role");
74 }
else if(dossier !=
null) {
75 wc.
addClause(
"and comment.issue.dossier = :dossier");
85 this.ckRegistered = ckRegistered;
93 this.dossier = dossier;
101 this.fromDate = fromDate;
109 this.subject = subject;
void setFromDate(Date fromDate)
void setSubject(Contact subject)
void setCkRegistered(boolean ckRegistered)
java.util.List getRegistryList()
void addCriteria(WhereClause wc)
void setDossier(Dossier dossier)
void addClause(String clause)
void addNamedValue(String name, Object value)