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.directory.business;
35
36 import fr.paris.lutece.util.ReferenceList;
37
38 import java.sql.Timestamp;
39
40 import java.util.List;
41
42
43
44
45
46
47 public class RecordFieldFilter
48 {
49 public static final int ALL_INT = -1;
50 public static final int FILTER_FALSE = 0;
51 public static final int FILTER_TRUE = 1;
52 public static final int ORDER_NONE = -1;
53 public static final int ORDER_ASC = 0;
54 public static final int ORDER_DESC = 1;
55 private int _nIdDirectory = ALL_INT;
56 private int _nIdRecord = ALL_INT;
57 private int _nIdField = ALL_INT;
58 private int _nIdEntry = ALL_INT;
59 private Timestamp _tDateFirst;
60 private Timestamp _tDateLast;
61 private int _nIsEntryShownInResultList = ALL_INT;
62 private int _nIsEntryShownInResultRecord = ALL_INT;
63 private int _nIsDisabled = ALL_INT;
64 private ReferenceList _workgroupKeyList;
65 private List<String> _roleKeyList;
66 private boolean _bIncludeRoleNull;
67 private IEntry _sortEntry;
68 private int _nSortOrder = ORDER_NONE;
69 private boolean _bOrderByDateModification = false;
70 private boolean _bContainsFile = false;
71
72
73
74
75
76
77 public IEntry getSortEntry( )
78 {
79 return _sortEntry;
80 }
81
82
83
84
85
86
87
88 public void setSortEntry( IEntry sortEntry )
89 {
90 this._sortEntry = sortEntry;
91 }
92
93
94
95
96
97
98 public boolean containsSortEntry( )
99 {
100 return _sortEntry != null;
101 }
102
103
104
105
106
107
108
109
110
111 public int getSortOrder( )
112 {
113 return _nSortOrder;
114 }
115
116
117
118
119
120
121
122
123
124
125 public void setSortOrder( int nSortOrder )
126 {
127 this._nSortOrder = nSortOrder;
128 }
129
130
131
132
133
134
135 public boolean containsSortOrder( )
136 {
137 return this._nSortOrder != ORDER_NONE;
138 }
139
140
141
142
143
144 public int getIdDirectory( )
145 {
146 return _nIdDirectory;
147 }
148
149
150
151
152
153
154
155 public void setIdDirectory( int idDirectory )
156 {
157 _nIdDirectory = idDirectory;
158 }
159
160
161
162
163
164
165 public boolean containsIdDirectory( )
166 {
167 return ( _nIdDirectory != ALL_INT );
168 }
169
170
171
172
173
174 public int getIdRecord( )
175 {
176 return _nIdRecord;
177 }
178
179
180
181
182
183
184
185 public void setIdRecord( int idRecord )
186 {
187 _nIdRecord = idRecord;
188 }
189
190
191
192
193
194
195 public boolean containsIdRecord( )
196 {
197 return ( _nIdRecord != ALL_INT );
198 }
199
200
201
202
203
204 public int getIdField( )
205 {
206 return _nIdField;
207 }
208
209
210
211
212
213
214
215 public void setIdField( int idField )
216 {
217 _nIdField = idField;
218 }
219
220
221
222
223
224 public boolean containsIdField( )
225 {
226 return ( _nIdField != ALL_INT );
227 }
228
229
230
231
232
233 public int getIdEntry( )
234 {
235 return _nIdEntry;
236 }
237
238
239
240
241
242
243
244 public void setIdEntry( int idEntry )
245 {
246 _nIdEntry = idEntry;
247 }
248
249
250
251
252
253 public boolean containsIdEntry( )
254 {
255 return ( _nIdEntry != ALL_INT );
256 }
257
258
259
260
261
262 public Timestamp getDateFirst( )
263 {
264 return _tDateFirst;
265 }
266
267
268
269
270
271
272
273 public void setDateFirst( Timestamp begin )
274 {
275 _tDateFirst = begin;
276 }
277
278
279
280
281
282 public boolean containsDateFirst( )
283 {
284 return ( _tDateFirst != null );
285 }
286
287
288
289
290
291 public Timestamp getDateLast( )
292 {
293 return _tDateLast;
294 }
295
296
297
298
299
300
301
302 public void setDateLast( Timestamp end )
303 {
304 _tDateLast = end;
305 }
306
307
308
309
310
311 public boolean containsDateLast( )
312 {
313 return ( _tDateLast != null );
314 }
315
316
317
318
319
320
321 public int getIsEntryShownInResultList( )
322 {
323 return _nIsEntryShownInResultList;
324 }
325
326
327
328
329
330
331
332 public void setIsEntryShownInResultList( int nIsShown )
333 {
334 _nIsEntryShownInResultList = nIsShown;
335 }
336
337
338
339
340
341 public boolean containsIsEntryShownInResultList( )
342 {
343 return ( _nIsEntryShownInResultList != ALL_INT );
344 }
345
346
347
348
349
350
351 public int getIsEntryShownInResultRecord( )
352 {
353 return _nIsEntryShownInResultRecord;
354 }
355
356
357
358
359
360
361
362
363 public void setIsEntryShownInResultRecord( int nIsShown )
364 {
365 _nIsEntryShownInResultRecord = nIsShown;
366 }
367
368
369
370
371
372 public boolean containsIsEntryShownInResultRecord( )
373 {
374 return ( _nIsEntryShownInResultRecord != ALL_INT );
375 }
376
377
378
379
380
381 public int getIsDisabled( )
382 {
383 return _nIsDisabled;
384 }
385
386
387
388
389
390
391
392 public void setIsDisabled( int idState )
393 {
394 _nIsDisabled = idState;
395 }
396
397
398
399
400
401 public boolean containsIsDisabled( )
402 {
403 return ( _nIsDisabled != ALL_INT );
404 }
405
406
407
408
409
410
411
412 public void setWorkgroupKeyList( ReferenceList workgroupKeyList )
413 {
414 this._workgroupKeyList = workgroupKeyList;
415 }
416
417
418
419
420
421
422
423
424
425
426
427 public void setRoleKeyList( List<String> roleKeyList, boolean bIncludeRoleNone, boolean bIncludeRoleNull )
428 {
429 this._roleKeyList = roleKeyList;
430
431 if ( bIncludeRoleNone )
432 {
433 roleKeyList.add( Directory.ROLE_NONE );
434 }
435
436 this._bIncludeRoleNull = bIncludeRoleNull;
437 }
438
439
440
441
442
443
444 public boolean containsRoleKeyList( )
445 {
446 return ( ( _roleKeyList != null ) && ( _roleKeyList.size( ) > 0 ) );
447 }
448
449
450
451
452
453
454 public List<String> getRoleKeyList( )
455 {
456 return _roleKeyList;
457 }
458
459
460
461
462 public boolean includeRoleNull( )
463 {
464 return _bIncludeRoleNull;
465 }
466
467
468
469
470
471
472 public ReferenceList getWorkgroupKeyList( )
473 {
474 return _workgroupKeyList;
475 }
476
477
478
479
480
481 public boolean containsWorkgroupKeyList( )
482 {
483 return ( ( _workgroupKeyList != null ) && ( _workgroupKeyList.size( ) != 0 ) );
484 }
485
486
487
488
489
490
491
492 public void setOrderByDateModification( boolean bOrderByDateModification )
493 {
494 _bOrderByDateModification = bOrderByDateModification;
495 }
496
497
498
499
500
501
502 public boolean isOrderByDateModification( )
503 {
504 return _bOrderByDateModification;
505 }
506
507
508
509
510
511
512 public boolean containsFile( )
513 {
514 return _bContainsFile;
515 }
516
517
518
519
520
521
522
523 public void setContainsFile( boolean bContainsFile )
524 {
525 _bContainsFile = bContainsFile;
526 }
527
528 }