View Javadoc
1   /*
2    * Copyright (c) 2002-2018, Mairie de 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.io.Serializable;
37  import java.sql.Date;
38  
39  import fr.paris.lutece.plugins.appointment.business.user.User;
40  
41  public final class AppointmentFilterDTO extends User implements Serializable
42  {
43  
44      /**
45       * Serial version UID
46       */
47      private static final long serialVersionUID = -8087511361613314595L;
48  
49      /**
50       * The form Id
51       */
52      private int _nIdForm;
53  
54      /**
55       * The starting date for the search
56       */
57      private Date _startingDateOfSearch;
58  
59      /**
60       * the ending date for the search
61       */
62      private Date _endingDateOfSearch;
63  
64      /**
65       * The starting time for the search
66       */
67      private String _strStartingTimeOfSearch;
68  
69      /**
70       * the ending time for the search
71       */
72      private String _strEndingTimeOfSearch;
73  
74      /**
75       * The reference of the appointment to search
76       */
77      private String _strReference;
78  
79      /**
80       * The status
81       */
82      private int _status = -1;
83  
84      /**
85       * Get the form id
86       * 
87       * @return the form id
88       */
89      public int getIdForm( )
90      {
91          return _nIdForm;
92      }
93  
94      /**
95       * Set the form id
96       * 
97       * @param nIdForm
98       *            the form id to set
99       */
100     public void setIdForm( int nIdForm )
101     {
102         this._nIdForm = nIdForm;
103     }
104 
105     /**
106      * Get the starting date of search
107      * 
108      * @return the starting date of search
109      */
110     public Date getStartingDateOfSearch( )
111     {
112         if ( _startingDateOfSearch != null )
113         {
114             return (Date) _startingDateOfSearch.clone( );
115         }
116         else
117         {
118             return null;
119         }
120     }
121 
122     /**
123      * Set the starting date of search
124      * 
125      * @param startingDateOfSearch
126      *            the starting date to set
127      */
128     public void setStartingDateOfSearch( Date startingDateOfSearch )
129     {
130         if ( startingDateOfSearch != null )
131         {
132             this._startingDateOfSearch = (Date) startingDateOfSearch.clone( );
133         }
134         else
135         {
136             this._startingDateOfSearch = null;
137         }
138     }
139 
140     /**
141      * Get the ending date of search
142      * 
143      * @return the ending date
144      */
145     public Date getEndingDateOfSearch( )
146     {
147         if ( _endingDateOfSearch != null )
148         {
149             return (Date) _endingDateOfSearch.clone( );
150         }
151         else
152         {
153             return null;
154         }
155 
156     }
157 
158     /**
159      * Set the ending date of search to the filter
160      * 
161      * @param endingDateOfSearch
162      *            the ending date of search to set
163      */
164     public void setEndingDateOfSearch( Date endingDateOfSearch )
165     {
166         if ( endingDateOfSearch != null )
167         {
168             this._endingDateOfSearch = (Date) endingDateOfSearch.clone( );
169         }
170         else
171         {
172             this._endingDateOfSearch = null;
173         }
174     }
175 
176     /**
177      * Get the starting time of search
178      * 
179      * @return the starting time of search
180      */
181     public String getStartingTimeOfSearch( )
182     {
183         return _strStartingTimeOfSearch;
184     }
185 
186     /**
187      * Set the starting time of search
188      * 
189      * @param strStartingTimeOfSearch
190      *            the starting time to set
191      */
192     public void setStartingTimeOfSearch( String strStartingTimeOfSearch )
193     {
194         this._strStartingTimeOfSearch = strStartingTimeOfSearch;
195     }
196 
197     /**
198      * Get the ending time of search
199      * 
200      * @return the ending time of search
201      */
202     public String getEndingTimeOfSearch( )
203     {
204         return _strEndingTimeOfSearch;
205     }
206 
207     /**
208      * Set the ending time of search
209      * 
210      * @param strEndingTimeOfSearch
211      *            the ending time to set
212      */
213     public void setEndingTimeOfSearch( String strEndingTimeOfSearch )
214     {
215         this._strEndingTimeOfSearch = strEndingTimeOfSearch;
216     }
217 
218     /**
219      * Get the reference entered in the filter
220      * 
221      * @return the reference
222      */
223     public String getReference( )
224     {
225         return _strReference;
226     }
227 
228     /**
229      * Set the reference to the filter
230      * 
231      * @param strReference
232      *            the reference to set
233      */
234     public void setReference( String strReference )
235     {
236         this._strReference = strReference;
237     }
238 
239     /**
240      * Get the status entered in the filter
241      * 
242      * @return the status selected
243      */
244     public int getStatus( )
245     {
246         return _status;
247     }
248 
249     /**
250      * Set the status to the filter
251      * 
252      * @param status
253      *            the status to set
254      */
255     public void setStatus( int status )
256     {
257         this._status = status;
258     }
259 
260 }