1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package fr.paris.lutece.plugins.crm.business.demand;
35
36 import fr.paris.lutece.plugins.crm.util.OperatorEnum;
37
38 import org.apache.commons.lang3.StringUtils;
39
40 import java.util.Date;
41
42
43
44
45
46
47 public class DemandTypeFilter
48 {
49 private static final int ALL_INT = -1;
50 private boolean _bIsWideSearch;
51 private String _strLabel;
52 private String _strUrlResource;
53 private int _nIdCategory;
54 private Date _dateBegin;
55 private Date _dateEnd;
56 private String _strWorkgroupKey;
57 private String _strRoleKey;
58 private int _nOrder;
59 private OperatorEnum _operatorOrder;
60 private OperatorEnum _operatorDateBegin;
61 private OperatorEnum _operatorDateEnd;
62 private String _strUrlDelete;
63
64
65
66
67 public DemandTypeFilter( )
68 {
69 _bIsWideSearch = false;
70 _strLabel = StringUtils.EMPTY;
71 _strUrlResource = StringUtils.EMPTY;
72 _nIdCategory = ALL_INT;
73 _strWorkgroupKey = StringUtils.EMPTY;
74 _nOrder = ALL_INT;
75 _operatorOrder = OperatorEnum.EQUAL;
76 _operatorDateBegin = OperatorEnum.EQUAL;
77 _operatorDateEnd = OperatorEnum.EQUAL;
78 _strUrlDelete = StringUtils.EMPTY;
79 }
80
81
82
83
84
85
86
87
88
89
90
91
92 public void setIsWideSearch( boolean bIsWideSearch )
93 {
94 _bIsWideSearch = bIsWideSearch;
95 }
96
97
98
99
100
101
102
103
104
105
106
107 public boolean getIsWideSearch( )
108 {
109 return _bIsWideSearch;
110 }
111
112
113
114
115
116
117 public String getLabel( )
118 {
119 return _strLabel;
120 }
121
122
123
124
125
126
127
128 public void setLabel( String strLabel )
129 {
130 _strLabel = strLabel;
131 }
132
133
134
135
136
137
138 public boolean containsLabel( )
139 {
140 return StringUtils.isNotBlank( _strLabel );
141 }
142
143
144
145
146
147
148 public String getUrlResource( )
149 {
150 return _strUrlResource;
151 }
152
153
154
155
156
157
158
159 public void setUrlResource( String strUrlResource )
160 {
161 _strUrlResource = strUrlResource;
162 }
163
164
165
166
167
168
169 public boolean containsUrlResource( )
170 {
171 return StringUtils.isNotBlank( _strUrlResource );
172 }
173
174
175
176
177
178
179 public int getIdCategory( )
180 {
181 return _nIdCategory;
182 }
183
184
185
186
187
188
189
190 public void setIdCategory( int nIdCategory )
191 {
192 _nIdCategory = nIdCategory;
193 }
194
195
196
197
198
199
200 public boolean containsIdCategory( )
201 {
202 return _nIdCategory != ALL_INT;
203 }
204
205
206
207
208
209
210
211 public void setDateBegin( Date dateBegin )
212 {
213 _dateBegin = dateBegin;
214 }
215
216
217
218
219
220
221 public Date getDateBegin( )
222 {
223 return _dateBegin;
224 }
225
226
227
228
229
230
231 public boolean containsDateBegin( )
232 {
233 return _dateBegin != null;
234 }
235
236
237
238
239
240
241
242 public void setDateEnd( Date dateEnd )
243 {
244 _dateEnd = dateEnd;
245 }
246
247
248
249
250
251
252 public Date getDateEnd( )
253 {
254 return _dateEnd;
255 }
256
257
258
259
260
261
262 public boolean containsDateEnd( )
263 {
264 return _dateEnd != null;
265 }
266
267
268
269
270
271
272
273 public void setWorkgroup( String strWorkgroupKey )
274 {
275 _strWorkgroupKey = strWorkgroupKey;
276 }
277
278
279
280
281
282
283 public String getWorkgroup( )
284 {
285 return _strWorkgroupKey;
286 }
287
288
289
290
291
292
293 public boolean containsWorkgroup( )
294 {
295 return StringUtils.isNotBlank( _strWorkgroupKey );
296 }
297
298
299
300
301
302
303
304 public void setRole( String strRoleKey )
305 {
306 _strRoleKey = strRoleKey;
307 }
308
309
310
311
312
313
314 public String getRole( )
315 {
316 return _strRoleKey;
317 }
318
319
320
321
322
323
324 public boolean containsRole( )
325 {
326 return StringUtils.isNotBlank( _strRoleKey );
327 }
328
329
330
331
332
333
334
335 public void setOrder( int nOrder )
336 {
337 _nOrder = nOrder;
338 }
339
340
341
342
343
344
345 public int getOrder( )
346 {
347 return _nOrder;
348 }
349
350
351
352
353
354
355 public boolean containsOrder( )
356 {
357 return _nOrder != ALL_INT;
358 }
359
360
361
362
363
364
365
366 public void setOperatorOrder( OperatorEnum operator )
367 {
368 _operatorOrder = operator;
369 }
370
371
372
373
374
375
376 public OperatorEnum getOperatorOrder( )
377 {
378 return _operatorOrder;
379 }
380
381
382
383
384
385
386
387 public void setOperatorDateBegin( OperatorEnum operator )
388 {
389 _operatorDateBegin = operator;
390 }
391
392
393
394
395
396
397 public OperatorEnum getOperatorDateBegin( )
398 {
399 return _operatorDateBegin;
400 }
401
402
403
404
405
406
407
408 public void setOperatorDateEnd( OperatorEnum operator )
409 {
410 _operatorDateEnd = operator;
411 }
412
413
414
415
416
417
418 public OperatorEnum getOperatorDateEnd( )
419 {
420 return _operatorDateEnd;
421 }
422
423
424
425
426
427
428 public String getUrlDelete( )
429 {
430 return _strUrlDelete;
431 }
432
433
434
435
436
437
438
439 public void setUrlDelete( String strUrlDelete )
440 {
441 _strUrlResource = strUrlDelete;
442 }
443
444
445
446
447
448
449 public boolean containsUrlDelete( )
450 {
451 return StringUtils.isNotBlank( _strUrlResource );
452 }
453 }