View Javadoc
1   /*
2    * Copyright (c) 2002-2022, City of Paris
3    * All rights reserved.
4    *
5    * Redistribution and use in source and binary forms, with or without
6    * modification, are permitted provided that the following conditions
7    * are met:
8    *
9    *  1. Redistributions of source code must retain the above copyright notice
10   *     and the following disclaimer.
11   *
12   *  2. Redistributions in binary form must reproduce the above copyright notice
13   *     and the following disclaimer in the documentation and/or other materials
14   *     provided with the distribution.
15   *
16   *  3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
17   *     contributors may be used to endorse or promote products derived from
18   *     this software without specific prior written permission.
19   *
20   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23   * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
24   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27   * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28   * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30   * POSSIBILITY OF SUCH DAMAGE.
31   *
32   * License 1.0
33   */
34  package fr.paris.lutece.plugins.appointment.web.dto;
35  
36  import java.sql.Date;
37  import java.util.ArrayList;
38  import java.util.List;
39  
40  import fr.paris.lutece.plugins.appointment.business.user.User;
41  
42  public class AppointmentFilterDTO extends User
43  {
44  
45      /**
46       * Serial version UID
47       */
48      private static final long serialVersionUID = -8087511361613314595L;
49  
50      /**
51       * The form Id
52       */
53      private int _nIdForm;
54  
55      /**
56       * The starting date for the search
57       */
58      private Date _startingDateOfSearch;
59  
60      /**
61       * the ending date for the search
62       */
63      private Date _endingDateOfSearch;
64  
65      /**
66       * The starting time for the search
67       */
68      private String _strStartingTimeOfSearch;
69  
70      /**
71       * the ending time for the search
72       */
73      private String _strEndingTimeOfSearch;
74  
75      /**
76       * The reference of the appointment to search
77       */
78      private String _strReference;
79  
80      /**
81       * The status
82       */
83      private int _status = -1;
84  
85      private List<Integer> _listIdAppointment = new ArrayList<>( );
86  
87  
88      private String _orderBy;
89  
90  
91      private boolean _orderAsc = true;
92  
93      /**
94       * Get the form id
95       * 
96       * @return the form id
97       */
98      public int getIdForm( )
99      {
100         return _nIdForm;
101     }
102 
103     /**
104      * Set the form id
105      * 
106      * @param nIdForm
107      *            the form id to set
108      */
109     public void setIdForm( int nIdForm )
110     {
111         this._nIdForm = nIdForm;
112     }
113 
114     /**
115      * Get the starting date of search
116      * 
117      * @return the starting date of search
118      */
119     public Date getStartingDateOfSearch( )
120     {
121         if ( _startingDateOfSearch != null )
122         {
123             return (Date) _startingDateOfSearch.clone( );
124         }
125         else
126         {
127             return null;
128         }
129     }
130 
131     /**
132      * Set the starting date of search
133      * 
134      * @param startingDateOfSearch
135      *            the starting date to set
136      */
137     public void setStartingDateOfSearch( Date startingDateOfSearch )
138     {
139         if ( startingDateOfSearch != null )
140         {
141             this._startingDateOfSearch = (Date) startingDateOfSearch.clone( );
142         }
143         else
144         {
145             this._startingDateOfSearch = null;
146         }
147     }
148 
149     /**
150      * Get the ending date of search
151      * 
152      * @return the ending date
153      */
154     public Date getEndingDateOfSearch( )
155     {
156         if ( _endingDateOfSearch != null )
157         {
158             return (Date) _endingDateOfSearch.clone( );
159         }
160         else
161         {
162             return null;
163         }
164 
165     }
166 
167     /**
168      * Set the ending date of search to the filter
169      * 
170      * @param endingDateOfSearch
171      *            the ending date of search to set
172      */
173     public void setEndingDateOfSearch( Date endingDateOfSearch )
174     {
175         if ( endingDateOfSearch != null )
176         {
177             this._endingDateOfSearch = (Date) endingDateOfSearch.clone( );
178         }
179         else
180         {
181             this._endingDateOfSearch = null;
182         }
183     }
184 
185     /**
186      * Get the starting time of search
187      * 
188      * @return the starting time of search
189      */
190     public String getStartingTimeOfSearch( )
191     {
192         return _strStartingTimeOfSearch;
193     }
194 
195     /**
196      * Set the starting time of search
197      * 
198      * @param strStartingTimeOfSearch
199      *            the starting time to set
200      */
201     public void setStartingTimeOfSearch( String strStartingTimeOfSearch )
202     {
203         this._strStartingTimeOfSearch = strStartingTimeOfSearch;
204     }
205 
206     /**
207      * Get the ending time of search
208      * 
209      * @return the ending time of search
210      */
211     public String getEndingTimeOfSearch( )
212     {
213         return _strEndingTimeOfSearch;
214     }
215 
216     /**
217      * Set the ending time of search
218      * 
219      * @param strEndingTimeOfSearch
220      *            the ending time to set
221      */
222     public void setEndingTimeOfSearch( String strEndingTimeOfSearch )
223     {
224         this._strEndingTimeOfSearch = strEndingTimeOfSearch;
225     }
226 
227     /**
228      * Get the reference entered in the filter
229      * 
230      * @return the reference
231      */
232     public String getReference( )
233     {
234         return _strReference;
235     }
236 
237     /**
238      * Set the reference to the filter
239      * 
240      * @param strReference
241      *            the reference to set
242      */
243     public void setReference( String strReference )
244     {
245         this._strReference = strReference;
246     }
247 
248     /**
249      * Get the status entered in the filter
250      * 
251      * @return the status selected
252      */
253     public int getStatus( )
254     {
255         return _status;
256     }
257 
258     /**
259      * Set the status to the filter
260      * 
261      * @param status
262      *            the status to set
263      */
264     public void setStatus( int status )
265     {
266         this._status = status;
267     }
268 
269     /**
270      * @return the listIdAppointment
271      */
272     public List<Integer> getListIdAppointment( )
273     {
274         return new ArrayList<>( _listIdAppointment );
275     }
276 
277     /**
278      * @param listIdAppointment
279      *            the listIdAppointment to set
280      */
281     public void setListIdAppointment( List<Integer> listIdAppointment )
282     {
283         _listIdAppointment = new ArrayList<>( listIdAppointment );
284     }
285 
286     public String getOrderBy() {
287         return _orderBy;
288     }
289 
290     public void setOrderBy(String orderBy) {
291         this._orderBy = orderBy;
292     }
293 
294     public boolean isOrderAsc() {
295         return _orderAsc;
296     }
297 
298     public void setOrderAsc(boolean orderAsc) {
299         this._orderAsc = orderAsc;
300     }
301 }