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.genericattributes.business;
35
36 import fr.paris.lutece.plugins.genericattributes.util.GenericAttributesUtils;
37
38 import org.apache.commons.collections.CollectionUtils;
39 import org.apache.commons.lang3.StringUtils;
40
41 import java.util.List;
42
43
44
45
46
47
48 public class ResponseFilter
49 {
50 private int _nIdResource = GenericAttributesUtils.CONSTANT_ID_NULL;
51 private int _nIdField = GenericAttributesUtils.CONSTANT_ID_NULL;
52 private int _nIdEntry = GenericAttributesUtils.CONSTANT_ID_NULL;
53 private boolean _bGroupbyDay;
54 private boolean _bGroupbyWeek;
55 private boolean _bGroupbyMonth;
56 private String _strOrderBy;
57 private boolean _bIsOrderByAsc = true;
58 private List<Integer> _listId;
59 private String _strCodeEntry;
60 private String _strResponseValue;
61
62
63
64
65
66
67 public int getIdResource( )
68 {
69 return _nIdResource;
70 }
71
72
73
74
75
76
77
78 public void setIdResource( int nIdResource )
79 {
80 _nIdResource = nIdResource;
81 }
82
83
84
85
86
87 public boolean containsIdResource( )
88 {
89 return ( _nIdResource != GenericAttributesUtils.CONSTANT_ID_NULL );
90 }
91
92
93
94
95
96 public int getIdField( )
97 {
98 return _nIdField;
99 }
100
101
102
103
104
105
106
107 public void setIdField( int idField )
108 {
109 _nIdField = idField;
110 }
111
112
113
114
115
116 public boolean containsIdField( )
117 {
118 return ( _nIdField != GenericAttributesUtils.CONSTANT_ID_NULL );
119 }
120
121
122
123
124
125 public int getIdEntry( )
126 {
127 return _nIdEntry;
128 }
129
130
131
132
133
134
135
136 public void setIdEntry( int idEntry )
137 {
138 _nIdEntry = idEntry;
139 }
140
141
142
143
144
145 public boolean containsIdEntry( )
146 {
147 return ( _nIdEntry != GenericAttributesUtils.CONSTANT_ID_NULL );
148 }
149
150
151
152
153
154 public boolean isGroupbyDay( )
155 {
156 return _bGroupbyDay;
157 }
158
159
160
161
162
163
164
165 public void setGroupbyDay( boolean groupbyDay )
166 {
167 _bGroupbyDay = groupbyDay;
168 }
169
170
171
172
173
174
175 public boolean isGroupbyMonth( )
176 {
177 return _bGroupbyMonth;
178 }
179
180
181
182
183
184
185
186 public void setGroupbyMonth( boolean groupbyMonth )
187 {
188 _bGroupbyMonth = groupbyMonth;
189 }
190
191
192
193
194
195
196 public boolean isGroupbyWeek( )
197 {
198 return _bGroupbyWeek;
199 }
200
201
202
203
204
205
206
207 public void setGroupbyWeek( boolean groupbyWeek )
208 {
209 _bGroupbyWeek = groupbyWeek;
210 }
211
212
213
214
215
216
217
218 public void setOrderBy( String strOrderBy )
219 {
220 _strOrderBy = strOrderBy;
221 }
222
223
224
225
226
227
228 public String getOrderBy( )
229 {
230 return _strOrderBy;
231 }
232
233
234
235
236
237
238 public boolean containsOrderBy( )
239 {
240 return StringUtils.isNotBlank( _strOrderBy );
241 }
242
243
244
245
246
247
248
249 public void setOrderByAsc( boolean bIsOrderByAsc )
250 {
251 _bIsOrderByAsc = bIsOrderByAsc;
252 }
253
254
255
256
257
258
259 public boolean isOrderByAsc( )
260 {
261 return _bIsOrderByAsc;
262 }
263
264
265
266
267 public List<Integer> getListId( )
268 {
269 return this._listId;
270 }
271
272
273
274
275
276 public void setListId( List<Integer> listId )
277 {
278 this._listId = listId;
279 }
280
281
282
283
284
285 public boolean containsListIdResource( )
286 {
287 return CollectionUtils.isNotEmpty( _listId );
288 }
289
290
291
292
293
294
295 public boolean containsCodeEntry( )
296 {
297 return StringUtils.isNotBlank( _strCodeEntry );
298 }
299
300
301
302
303 public String getCodeEntry( )
304 {
305 return _strCodeEntry;
306 }
307
308
309
310
311
312 public void setCodeEntry( String strCodeEntry )
313 {
314 this._strCodeEntry = strCodeEntry;
315 }
316
317
318
319
320 public String getResponseValue( )
321 {
322 return _strResponseValue;
323 }
324
325
326
327
328
329 public void setResponseValue( String strResponseValue )
330 {
331 _strResponseValue = strResponseValue;
332 }
333
334
335
336
337
338
339 public boolean containsResponseValue( )
340 {
341 return StringUtils.isNotBlank( _strResponseValue );
342 }
343 }