BrightSide Workbench Full Report + Source Code
org.turro.dossier.search.RegistryResults Class Reference

Public Member Functions

 RegistryResults ()
 
java.util.List getRegistryList ()
 
void addCriteria (WhereClause wc)
 
boolean isCkRegistered ()
 
void setCkRegistered (boolean ckRegistered)
 
Dossier getDossier ()
 
void setDossier (Dossier dossier)
 
Date getFromDate ()
 
void setFromDate (Date fromDate)
 
Contact getSubject ()
 
void setSubject (Contact subject)
 

Detailed Description

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

Definition at line 32 of file RegistryResults.java.

Constructor & Destructor Documentation

◆ RegistryResults()

org.turro.dossier.search.RegistryResults.RegistryResults ( )

Definition at line 39 of file RegistryResults.java.

39  {
40  }

Member Function Documentation

◆ addCriteria()

void org.turro.dossier.search.RegistryResults.addCriteria ( WhereClause  wc)

Definition at line 53 of file RegistryResults.java.

53  {
54  if(subject == null && dossier == null) {
55  wc.addClause("and 1=0");
56  return;
57  }
58 
59  wc.addClause("and comment.processed = :processed");
60  wc.addNamedValue("processed", ckRegistered);
61 
62  if(fromDate != null) {
63  wc.addClause("and comment.modification >= :modification");
64  wc.addNamedValue("modification", fromDate);
65  }
66 
67  if(subject != null) {
68  wc.addClause("and (");
69  wc.addClause("participant.idContact = :idContact");
70  wc.addNamedValue("idContact", subject.getId());
71  wc.addClause("and participant.role = :role");
72  wc.addNamedValue("role", ParticipantRole.PARTICIPANT_SUBJECT);
73  wc.addClause(")");
74  } else if(dossier != null) {
75  wc.addClause("and comment.issue.dossier = :dossier");
76  wc.addNamedValue("dossier", dossier);
77  }
78  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDossier()

Dossier org.turro.dossier.search.RegistryResults.getDossier ( )

Definition at line 88 of file RegistryResults.java.

88  {
89  return dossier;
90  }

◆ getFromDate()

Date org.turro.dossier.search.RegistryResults.getFromDate ( )

Definition at line 96 of file RegistryResults.java.

96  {
97  return fromDate;
98  }

◆ getRegistryList()

java.util.List org.turro.dossier.search.RegistryResults.getRegistryList ( )

Definition at line 42 of file RegistryResults.java.

42  {
43  Dao dao = new DossierPU();
44  WhereClause wc = new WhereClause();
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)");
48  addCriteria(wc);
49  wc.addClause("order by comment.modification");
50  return dao.getResultList(wc);
51  }
Here is the call graph for this function:

◆ getSubject()

Contact org.turro.dossier.search.RegistryResults.getSubject ( )

Definition at line 104 of file RegistryResults.java.

104  {
105  return subject;
106  }

◆ isCkRegistered()

boolean org.turro.dossier.search.RegistryResults.isCkRegistered ( )

Definition at line 80 of file RegistryResults.java.

80  {
81  return ckRegistered;
82  }

◆ setCkRegistered()

void org.turro.dossier.search.RegistryResults.setCkRegistered ( boolean  ckRegistered)

Definition at line 84 of file RegistryResults.java.

84  {
85  this.ckRegistered = ckRegistered;
86  }

◆ setDossier()

void org.turro.dossier.search.RegistryResults.setDossier ( Dossier  dossier)

Definition at line 92 of file RegistryResults.java.

92  {
93  this.dossier = dossier;
94  }

◆ setFromDate()

void org.turro.dossier.search.RegistryResults.setFromDate ( Date  fromDate)

Definition at line 100 of file RegistryResults.java.

100  {
101  this.fromDate = fromDate;
102  }

◆ setSubject()

void org.turro.dossier.search.RegistryResults.setSubject ( Contact  subject)

Definition at line 108 of file RegistryResults.java.

108  {
109  this.subject = subject;
110  }

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