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

Public Member Functions

Long getCount ()
 
Long getOpenedCount ()
 
Long getParticipantsCount ()
 
Long getCommentCount ()
 
List getByType ()
 
List getByStatus ()
 
List getByResolution ()
 
Collection< Long > getDossiersId ()
 
List getResponsiblesId ()
 
List getReportersId ()
 
List getAssistantsId ()
 
List getQAsId ()
 
IContact getIContact (String contactId)
 
DWDossier getDossier (Long dossierId)
 
DWIssue getIssue (Long issueId)
 
String getParticipantId ()
 
void setParticipantId (String participantId)
 
String getCategoryPath ()
 
void setCategoryPath (String categoryPath)
 
Long getDossierId ()
 
void setDossierId (Long dossierId)
 
Long getVersionId ()
 
void setVersionId (Long versionId)
 
Date getStartDate ()
 
void setStartDate (Date startDate)
 
Date getEndDate ()
 
void setEndDate (Date endDate)
 
ParticipantRole getParticipantRole ()
 
void setParticipantRole (ParticipantRole participantRole)
 
IssueType getType ()
 
void setType (IssueType type)
 
IssuePriority getPriority ()
 
void setPriority (IssuePriority priority)
 
IssueStatus getStatus ()
 
void setStatus (IssueStatus status)
 
IssueResolution getResolution ()
 
void setResolution (IssueResolution resolution)
 
IContact getIParticipant ()
 
void setIParticipant (IContact contact)
 

Detailed Description

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

Definition at line 41 of file DWIssueModel.java.

Member Function Documentation

◆ getAssistantsId()

List org.turro.dossier.dw.DWIssueModel.getAssistantsId ( )

Definition at line 158 of file DWIssueModel.java.

158  {
159  WhereClause wc = new WhereClause();
160  wc.addClause("select distinct participantId, count(distinct issueId)");
161  wc.addClause(",(select count(distinct i2.issueId) from DWIssue i2 where i2.participantId = i.participantId and i2.status <> :status2 and i2.participantRole = :participantRole2)");
162  wc.addNamedValue("status2", IssueStatus.STATUS_CLOSED);
163  wc.addNamedValue("participantRole2", IssueParticipantRole.ISSUE_ASSISTANT);
164  wc.addClause("from DWIssue i");
165  wc.addClause("where participantRole = :participantRole");
166  wc.addNamedValue("participantRole", IssueParticipantRole.ISSUE_ASSISTANT);
167  addCriteriaParticipantExists(wc);
168  wc.addClause("group by participantId");
169  wc.addClause("order by 2 desc");
170  return getDao().getResultList(wc);
171  }
Here is the call graph for this function:

◆ getByResolution()

List org.turro.dossier.dw.DWIssueModel.getByResolution ( )

Definition at line 110 of file DWIssueModel.java.

110  {
111  WhereClause wc = new WhereClause();
112  wc.addClause("select resolution, count(distinct issueId)");
113  wc.addClause("from DWIssue");
114  wc.addClause("where 1=1");
115  addCriteria(wc);
116  wc.addClause("group by resolution");
117  return getDao().getResultList(wc);
118  }
Here is the call graph for this function:

◆ getByStatus()

List org.turro.dossier.dw.DWIssueModel.getByStatus ( )

Definition at line 100 of file DWIssueModel.java.

100  {
101  WhereClause wc = new WhereClause();
102  wc.addClause("select status, count(distinct issueId)");
103  wc.addClause("from DWIssue");
104  wc.addClause("where 1=1");
105  addCriteria(wc);
106  wc.addClause("group by status");
107  return getDao().getResultList(wc);
108  }
Here is the call graph for this function:

◆ getByType()

List org.turro.dossier.dw.DWIssueModel.getByType ( )

Definition at line 90 of file DWIssueModel.java.

90  {
91  WhereClause wc = new WhereClause();
92  wc.addClause("select type, count(distinct issueId)");
93  wc.addClause("from DWIssue");
94  wc.addClause("where 1=1");
95  addCriteria(wc);
96  wc.addClause("group by type");
97  return getDao().getResultList(wc);
98  }
Here is the call graph for this function:

◆ getCategoryPath()

String org.turro.dossier.dw.DWIssueModel.getCategoryPath ( )

Definition at line 212 of file DWIssueModel.java.

212  {
213  return categoryPath;
214  }

◆ getCommentCount()

Long org.turro.dossier.dw.DWIssueModel.getCommentCount ( )

Definition at line 81 of file DWIssueModel.java.

81  {
82  WhereClause wc = new WhereClause();
83  wc.addClause("select sum(commentCount)");
84  wc.addClause("from DWIssue");
85  wc.addClause("where 1=1");
86  addCriteria(wc);
87  return (Long) getDao().getSingleResultOrNull(wc);
88  }
Object getSingleResultOrNull(SqlClause sc)
Definition: Dao.java:419
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCount()

Long org.turro.dossier.dw.DWIssueModel.getCount ( )

Definition at line 53 of file DWIssueModel.java.

53  {
54  WhereClause wc = new WhereClause();
55  wc.addClause("select count(distinct issueId)");
56  wc.addClause("from DWIssue");
57  wc.addClause("where 1=1");
58  addCriteria(wc);
59  return (Long) getDao().getSingleResultOrNull(wc);
60  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDossier()

DWDossier org.turro.dossier.dw.DWIssueModel.getDossier ( Long  dossierId)

Definition at line 194 of file DWIssueModel.java.

194  {
195  return getDao().find(DWDossier.class, dossierId);
196  }

◆ getDossierId()

Long org.turro.dossier.dw.DWIssueModel.getDossierId ( )

Definition at line 220 of file DWIssueModel.java.

220  {
221  return dossierId;
222  }

◆ getDossiersId()

Collection<Long> org.turro.dossier.dw.DWIssueModel.getDossiersId ( )

Definition at line 120 of file DWIssueModel.java.

120  {
121  WhereClause wc = new WhereClause();
122  wc.addClause("select distinct dossierId");
123  wc.addClause("from DWIssue i");
124  addCriteria(wc);
125  return getDao().getResultList(wc);
126  }
Here is the call graph for this function:

◆ getEndDate()

Date org.turro.dossier.dw.DWIssueModel.getEndDate ( )

Definition at line 244 of file DWIssueModel.java.

244  {
245  return endDate;
246  }

◆ getIContact()

IContact org.turro.dossier.dw.DWIssueModel.getIContact ( String  contactId)

Definition at line 189 of file DWIssueModel.java.

189  {
190  return Contacts.getContactById(contactId);
191  }
Here is the call graph for this function:

◆ getIParticipant()

IContact org.turro.dossier.dw.DWIssueModel.getIParticipant ( )

Definition at line 358 of file DWIssueModel.java.

358  {
359  if(_contact == null) {
360  _contact = Contacts.getContactById(participantId);
361  }
362  return _contact;
363  }
Here is the call graph for this function:

◆ getIssue()

DWIssue org.turro.dossier.dw.DWIssueModel.getIssue ( Long  issueId)

Definition at line 199 of file DWIssueModel.java.

199  {
200  return getDao().find(DWIssue.class, issueId);
201  }

◆ getOpenedCount()

Long org.turro.dossier.dw.DWIssueModel.getOpenedCount ( )

Definition at line 62 of file DWIssueModel.java.

62  {
63  WhereClause wc = new WhereClause();
64  wc.addClause("select count(distinct issueId)");
65  wc.addClause("from DWIssue");
66  wc.addClause("where status <> :status");
67  wc.addNamedValue("status", IssueStatus.STATUS_CLOSED);
68  addCriteria(wc);
69  return (Long) getDao().getSingleResultOrNull(wc);
70  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getParticipantId()

String org.turro.dossier.dw.DWIssueModel.getParticipantId ( )

Definition at line 203 of file DWIssueModel.java.

203  {
204  return participantId;
205  }

◆ getParticipantRole()

ParticipantRole org.turro.dossier.dw.DWIssueModel.getParticipantRole ( )

Definition at line 252 of file DWIssueModel.java.

252  {
253  return participantRole;
254  }

◆ getParticipantsCount()

Long org.turro.dossier.dw.DWIssueModel.getParticipantsCount ( )

Definition at line 72 of file DWIssueModel.java.

72  {
73  WhereClause wc = new WhereClause();
74  wc.addClause("select count(participantId)");
75  wc.addClause("from DWIssue");
76  wc.addClause("where 1=1");
77  addCriteria(wc);
78  return (Long) getDao().getSingleResultOrNull(wc);
79  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPriority()

IssuePriority org.turro.dossier.dw.DWIssueModel.getPriority ( )

Definition at line 268 of file DWIssueModel.java.

268  {
269  return priority;
270  }

◆ getQAsId()

List org.turro.dossier.dw.DWIssueModel.getQAsId ( )

Definition at line 173 of file DWIssueModel.java.

173  {
174  WhereClause wc = new WhereClause();
175  wc.addClause("select distinct participantId, count(distinct issueId)");
176  wc.addClause(",(select count(distinct i2.issueId) from DWIssue i2 where i2.participantId = i.participantId and i2.status <> :status2 and i2.participantRole = :participantRole2)");
177  wc.addNamedValue("status2", IssueStatus.STATUS_CLOSED);
178  wc.addNamedValue("participantRole2", IssueParticipantRole.ISSUE_QA);
179  wc.addClause("from DWIssue i");
180  wc.addClause("where participantRole = :participantRole");
181  wc.addNamedValue("participantRole", IssueParticipantRole.ISSUE_QA);
182  addCriteriaParticipantExists(wc);
183  wc.addClause("group by participantId");
184  wc.addClause("order by 2 desc");
185  return getDao().getResultList(wc);
186  }
Here is the call graph for this function:

◆ getReportersId()

List org.turro.dossier.dw.DWIssueModel.getReportersId ( )

Definition at line 143 of file DWIssueModel.java.

143  {
144  WhereClause wc = new WhereClause();
145  wc.addClause("select distinct participantId, count(distinct issueId)");
146  wc.addClause(",(select count(distinct i2.issueId) from DWIssue i2 where i2.participantId = i.participantId and i2.status <> :status2 and i2.participantRole = :participantRole2)");
147  wc.addNamedValue("status2", IssueStatus.STATUS_CLOSED);
148  wc.addNamedValue("participantRole2", IssueParticipantRole.ISSUE_REPORTER);
149  wc.addClause("from DWIssue i");
150  wc.addClause("where participantRole = :participantRole");
151  wc.addNamedValue("participantRole", IssueParticipantRole.ISSUE_REPORTER);
152  addCriteriaParticipantExists(wc);
153  wc.addClause("group by participantId");
154  wc.addClause("order by 2 desc");
155  return getDao().getResultList(wc);
156  }
Here is the call graph for this function:

◆ getResolution()

IssueResolution org.turro.dossier.dw.DWIssueModel.getResolution ( )

Definition at line 284 of file DWIssueModel.java.

284  {
285  return resolution;
286  }

◆ getResponsiblesId()

List org.turro.dossier.dw.DWIssueModel.getResponsiblesId ( )

Definition at line 128 of file DWIssueModel.java.

128  {
129  WhereClause wc = new WhereClause();
130  wc.addClause("select distinct participantId, count(distinct issueId)");
131  wc.addClause(",(select count(distinct i2.issueId) from DWIssue i2 where i2.participantId = i.participantId and i2.status <> :status2 and i2.participantRole = :participantRole2)");
132  wc.addNamedValue("status2", IssueStatus.STATUS_CLOSED);
133  wc.addNamedValue("participantRole2", IssueParticipantRole.ISSUE_RESPONSIBLE);
134  wc.addClause("from DWIssue i");
135  wc.addClause("where participantRole = :participantRole");
136  wc.addNamedValue("participantRole", IssueParticipantRole.ISSUE_RESPONSIBLE);
137  addCriteriaParticipantExists(wc);
138  wc.addClause("group by participantId");
139  wc.addClause("order by 2 desc");
140  return getDao().getResultList(wc);
141  }
Here is the call graph for this function:

◆ getStartDate()

Date org.turro.dossier.dw.DWIssueModel.getStartDate ( )

Definition at line 236 of file DWIssueModel.java.

236  {
237  return startDate;
238  }

◆ getStatus()

IssueStatus org.turro.dossier.dw.DWIssueModel.getStatus ( )

Definition at line 276 of file DWIssueModel.java.

276  {
277  return status;
278  }

◆ getType()

IssueType org.turro.dossier.dw.DWIssueModel.getType ( )

Definition at line 260 of file DWIssueModel.java.

260  {
261  return type;
262  }

◆ getVersionId()

Long org.turro.dossier.dw.DWIssueModel.getVersionId ( )

Definition at line 228 of file DWIssueModel.java.

228  {
229  return versionId;
230  }

◆ setCategoryPath()

void org.turro.dossier.dw.DWIssueModel.setCategoryPath ( String  categoryPath)

Definition at line 216 of file DWIssueModel.java.

216  {
217  this.categoryPath = categoryPath;
218  }

◆ setDossierId()

void org.turro.dossier.dw.DWIssueModel.setDossierId ( Long  dossierId)

Definition at line 224 of file DWIssueModel.java.

224  {
225  this.dossierId = dossierId;
226  }

◆ setEndDate()

void org.turro.dossier.dw.DWIssueModel.setEndDate ( Date  endDate)

Definition at line 248 of file DWIssueModel.java.

248  {
249  this.endDate = endDate;
250  }

◆ setIParticipant()

void org.turro.dossier.dw.DWIssueModel.setIParticipant ( IContact  contact)

Definition at line 365 of file DWIssueModel.java.

365  {
366  _contact = contact;
367  participantId = _contact != null ? _contact.getId() : null;
368  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setParticipantId()

void org.turro.dossier.dw.DWIssueModel.setParticipantId ( String  participantId)

Definition at line 207 of file DWIssueModel.java.

207  {
208  this.participantId = participantId;
209  resetIContact();
210  }

◆ setParticipantRole()

void org.turro.dossier.dw.DWIssueModel.setParticipantRole ( ParticipantRole  participantRole)

Definition at line 256 of file DWIssueModel.java.

256  {
257  this.participantRole = participantRole;
258  }

◆ setPriority()

void org.turro.dossier.dw.DWIssueModel.setPriority ( IssuePriority  priority)

Definition at line 272 of file DWIssueModel.java.

272  {
273  this.priority = priority;
274  }

◆ setResolution()

void org.turro.dossier.dw.DWIssueModel.setResolution ( IssueResolution  resolution)

Definition at line 288 of file DWIssueModel.java.

288  {
289  this.resolution = resolution;
290  }

◆ setStartDate()

void org.turro.dossier.dw.DWIssueModel.setStartDate ( Date  startDate)

Definition at line 240 of file DWIssueModel.java.

240  {
241  this.startDate = startDate;
242  }

◆ setStatus()

void org.turro.dossier.dw.DWIssueModel.setStatus ( IssueStatus  status)

Definition at line 280 of file DWIssueModel.java.

280  {
281  this.status = status;
282  }

◆ setType()

void org.turro.dossier.dw.DWIssueModel.setType ( IssueType  type)

Definition at line 264 of file DWIssueModel.java.

264  {
265  this.type = type;
266  }

◆ setVersionId()

void org.turro.dossier.dw.DWIssueModel.setVersionId ( Long  versionId)

Definition at line 232 of file DWIssueModel.java.

232  {
233  this.versionId = versionId;
234  }

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