View Javadoc
1   /*
2    * Copyright (c) 2002-2019, 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.atelieraba.business;
35  
36  import java.io.Serializable;
37  import java.sql.Date;
38  import java.sql.Timestamp;
39  
40  import javax.validation.constraints.Size;
41  
42  import org.hibernate.validator.constraints.Email;
43  import org.hibernate.validator.constraints.NotEmpty;
44  
45  /**
46   * This is the business class for the object Inscrit
47   */
48  public class Inscrit implements Serializable
49  {
50      private static final long  serialVersionUID            = 1L;
51      public static final String PATTERN_NAISSANCE           = "[0-9]{2}/[0-9]{2}/[0-9]{4}";
52      public static final String CONVERTER_PATTERN_NAISSANCE = "dd/MM/yyyy";
53      public static final String PATTERN_EMAIL               = "^[\\w!#$%&'*+/=?`{|}~^-]+(?:\\.[\\w!#$%&'*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$";
54      public static final String PATTERN_TELEPHONE           = "^((0|\\+[0-9]{2})[1-9][0-9]{8})$";
55  
56      // Variables declarations
57      private int                _nId;
58  
59      @NotEmpty( message = "#i18n{atelieraba.validation.inscrit.Nom.notEmpty}" )
60      @Size( max = 50, message = "#i18n{atelieraba.validation.inscrit.Nom.size}" )
61      private String             _strNom;
62  
63      @NotEmpty( message = "#i18n{atelieraba.validation.inscrit.Prenom.notEmpty}" )
64      @Size( max = 50, message = "#i18n{atelieraba.validation.inscrit.Prenom.size}" )
65      private String             _strPrenom;
66  
67      private Date               _strNaissance;
68  
69      @NotEmpty( message = "#i18n{atelieraba.validation.inscrit.AdresseDomicile.notEmpty}" )
70      @Size( max = 255, message = "#i18n{atelieraba.validation.inscrit.AdresseDomicile.size}" )
71      private String             _strAdresseDomicile;
72  
73      @NotEmpty( message = "#i18n{atelieraba.validation.inscrit.ContactNom.notEmpty}" )
74      @Size( max = 50, message = "#i18n{atelieraba.validation.inscrit.ContactNom.size}" )
75      private String             _strContactNom;
76  
77      @NotEmpty( message = "#i18n{atelieraba.validation.inscrit.ContactPrenom.notEmpty}" )
78      @Size( max = 50, message = "#i18n{atelieraba.validation.inscrit.ContactPrenom.size}" )
79      private String             _strContactPrenom;
80  
81      @Email( message = "#i18n{atelieraba.validation.inscrit.ContactEmail.isEmail}" )
82      @NotEmpty( message = "#i18n{atelieraba.validation.inscrit.ContactEmail.notEmpty}" )
83      @Size( max = 255, message = "#i18n{atelieraba.validation.inscrit.ContactEmail.size}" )
84      private String             _strContactEmail;
85  
86      @NotEmpty( message = "#i18n{atelieraba.validation.inscrit.ContactTelephone.notEmpty}" )
87      @Size( max = 50, message = "#i18n{atelieraba.validation.inscrit.ContactTelephone.size}" )
88      private String             _strContactTelephone;
89  
90      @NotEmpty( message = "#i18n{atelieraba.validation.inscrit.Source.notEmpty}" )
91      @Size( max = 50, message = "#i18n{atelieraba.validation.inscrit.Source.size}" )
92      private String             _strSource;
93  
94      private Timestamp          _dateDateInscription;
95  
96      private String             _strDecouverte;
97      private String             _strMotivation;
98      private String             _strDemarche;
99  
100     private boolean            _bProbableArpege;
101 
102     private String             _strGuid;
103     private boolean            _bDecouverte2;
104     private boolean            _bDecouverte3;
105     private boolean            _bDecouverte4;
106     private boolean            _bDecouverte5;
107     private boolean            _bDecouverte6;
108     private boolean            _bDecouverte7;
109     private boolean            _bMotivation2;
110     private boolean            _bMotivation3;
111     private boolean            _bMotivation4;
112     private boolean            _bDemarche2;
113     private boolean            _bDemarche3;
114     private boolean            _bDemarche4;
115 
116     /**
117      * Returns the Id
118      *
119      * @return The Id
120      */
121     public int getId( )
122     {
123         return _nId;
124     }
125 
126     /**
127      * Sets the Id
128      *
129      * @param nId
130      *            The Id
131      */
132     public void setId( int nId )
133     {
134         _nId = nId;
135     }
136 
137     /**
138      * Returns the Nom
139      *
140      * @return The Nom
141      */
142     public String getNom( )
143     {
144         return _strNom;
145     }
146 
147     /**
148      * Sets the Nom
149      *
150      * @param strNom
151      *            The Nom
152      */
153     public void setNom( String strNom )
154     {
155         _strNom = strNom;
156     }
157 
158     /**
159      * Returns the Prenom
160      *
161      * @return The Prenom
162      */
163     public String getPrenom( )
164     {
165         return _strPrenom;
166     }
167 
168     /**
169      * Sets the Prenom
170      *
171      * @param strPrenom
172      *            The Prenom
173      */
174     public void setPrenom( String strPrenom )
175     {
176         _strPrenom = strPrenom;
177     }
178 
179     /**
180      * Returns the Naissance
181      *
182      * @return The Naissance
183      */
184     public Date getNaissance( )
185     {
186         return _strNaissance;
187     }
188 
189     /**
190      * Sets the Naissance
191      *
192      * @param strNaissance
193      *            The Naissance
194      */
195     public void setNaissance( Date strNaissance )
196     {
197         _strNaissance = strNaissance;
198     }
199 
200     /**
201      * Returns the AdresseDomicile
202      *
203      * @return The AdresseDomicile
204      */
205     public String getAdresseDomicile( )
206     {
207         return _strAdresseDomicile;
208     }
209 
210     /**
211      * Sets the AdresseDomicile
212      *
213      * @param strAdresseDomicile
214      *            The AdresseDomicile
215      */
216     public void setAdresseDomicile( String strAdresseDomicile )
217     {
218         _strAdresseDomicile = strAdresseDomicile;
219     }
220 
221     /**
222      * Returns the ContactNom
223      *
224      * @return The ContactNom
225      */
226     public String getContactNom( )
227     {
228         return _strContactNom;
229     }
230 
231     /**
232      * Sets the ContactNom
233      *
234      * @param strContactNom
235      *            The ContactNom
236      */
237     public void setContactNom( String strContactNom )
238     {
239         _strContactNom = strContactNom;
240     }
241 
242     /**
243      * Returns the ContactPrenom
244      *
245      * @return The ContactPrenom
246      */
247     public String getContactPrenom( )
248     {
249         return _strContactPrenom;
250     }
251 
252     /**
253      * Sets the ContactPrenom
254      *
255      * @param strContactPrenom
256      *            The ContactPrenom
257      */
258     public void setContactPrenom( String strContactPrenom )
259     {
260         _strContactPrenom = strContactPrenom;
261     }
262 
263     /**
264      * Returns the ContactEmail
265      *
266      * @return The ContactEmail
267      */
268     public String getContactEmail( )
269     {
270         return _strContactEmail;
271     }
272 
273     /**
274      * Sets the ContactEmail
275      *
276      * @param strContactEmail
277      *            The ContactEmail
278      */
279     public void setContactEmail( String strContactEmail )
280     {
281         _strContactEmail = strContactEmail;
282     }
283 
284     /**
285      * Returns the ContactTelephone
286      *
287      * @return The ContactTelephone
288      */
289     public String getContactTelephone( )
290     {
291         return _strContactTelephone;
292     }
293 
294     /**
295      * Sets the ContactTelephone
296      *
297      * @param strContactTelephone
298      *            The ContactTelephone
299      */
300     public void setContactTelephone( String strContactTelephone )
301     {
302         _strContactTelephone = strContactTelephone;
303     }
304 
305     /**
306      * Returns the Source
307      *
308      * @return The Source
309      */
310     public String getSource( )
311     {
312         return _strSource;
313     }
314 
315     /**
316      * Sets the Source
317      *
318      * @param strSource
319      *            The Source
320      */
321     public void setSource( String strSource )
322     {
323         _strSource = strSource;
324     }
325 
326     /**
327      * Returns the DateInscription
328      *
329      * @return The DateInscription
330      */
331     public Timestamp getDateInscription( )
332     {
333         return _dateDateInscription;
334     }
335 
336     /**
337      * Sets the DateInscription
338      *
339      * @param dateDateInscription
340      *            The DateInscription
341      */
342     public void setDateInscription( Timestamp dateDateInscription )
343     {
344         _dateDateInscription = dateDateInscription;
345     }
346 
347     /**
348      * Returns the Decouverte
349      *
350      * @return The Decouverte
351      */
352     public String getDecouverte( )
353     {
354         return _strDecouverte;
355     }
356 
357     /**
358      * Sets the Decouverte
359      *
360      * @param strDecouverte
361      *            The Decouverte
362      */
363     public void setDecouverte( String strDecouverte )
364     {
365         _strDecouverte = strDecouverte;
366     }
367 
368     /**
369      * Returns the Motivation
370      *
371      * @return The Motivation
372      */
373     public String getMotivation( )
374     {
375         return _strMotivation;
376     }
377 
378     /**
379      * Sets the Motivation
380      *
381      * @param strMotivation
382      *            The Motivation
383      */
384     public void setMotivation( String strMotivation )
385     {
386         _strMotivation = strMotivation;
387     }
388 
389     /**
390      * Returns the Demarche
391      *
392      * @return The Demarche
393      */
394     public String getDemarche( )
395     {
396         return _strDemarche;
397     }
398 
399     /**
400      * Sets the Demarche
401      *
402      * @param strDemarche
403      *            The Demarche
404      */
405     public void setDemarche( String strDemarche )
406     {
407         _strDemarche = strDemarche;
408     }
409 
410     /**
411      * Returns the ProbableArpege
412      *
413      * @return The ProbableArpege
414      */
415     public boolean getProbableArpege( )
416     {
417         return _bProbableArpege;
418     }
419 
420     /**
421      * Sets the ProbableArpege
422      *
423      * @param bDemarche
424      *            The ProbableArpege
425      */
426     public void setProbableArpege( boolean bProbableArpege )
427     {
428         _bProbableArpege = bProbableArpege;
429     }
430 
431     /**
432      * Returns the Guid
433      *
434      * @return The Guid
435      */
436     public String getGuid( )
437     {
438         return _strGuid;
439     }
440 
441     /**
442      * Sets the Guid
443      *
444      * @param strGuid
445      *            The Guid
446      */
447     public void setGuid( String strGuid )
448     {
449         _strGuid = strGuid;
450     }
451 
452     public boolean getDecouverte2( )
453     {
454         return _bDecouverte2;
455     }
456 
457     public void setDecouverte2( boolean _bDecouverte2 )
458     {
459         this._bDecouverte2 = _bDecouverte2;
460     }
461 
462     public boolean getDecouverte3( )
463     {
464         return _bDecouverte3;
465     }
466 
467     public void setDecouverte3( boolean _bDecouverte3 )
468     {
469         this._bDecouverte3 = _bDecouverte3;
470     }
471 
472     public boolean getDecouverte4( )
473     {
474         return _bDecouverte4;
475     }
476 
477     public void setDecouverte4( boolean _bDecouverte4 )
478     {
479         this._bDecouverte4 = _bDecouverte4;
480     }
481 
482     public boolean getDecouverte5( )
483     {
484         return _bDecouverte5;
485     }
486 
487     public void setDecouverte5( boolean _bDecouverte5 )
488     {
489         this._bDecouverte5 = _bDecouverte5;
490     }
491 
492     public boolean getDecouverte6( )
493     {
494         return _bDecouverte6;
495     }
496 
497     public void setDecouverte6( boolean _bDecouverte6 )
498     {
499         this._bDecouverte6 = _bDecouverte6;
500     }
501 
502     public boolean getDecouverte7( )
503     {
504         return _bDecouverte7;
505     }
506 
507     public void setDecouverte7( boolean _bDecouverte7 )
508     {
509         this._bDecouverte7 = _bDecouverte7;
510     }
511 
512     public boolean getMotivation2( )
513     {
514         return _bMotivation2;
515     }
516 
517     public void setMotivation2( boolean _bMotivation2 )
518     {
519         this._bMotivation2 = _bMotivation2;
520     }
521 
522     public boolean getMotivation3( )
523     {
524         return _bMotivation3;
525     }
526 
527     public void setMotivation3( boolean _bMotivation3 )
528     {
529         this._bMotivation3 = _bMotivation3;
530     }
531 
532     public boolean getMotivation4( )
533     {
534         return _bMotivation4;
535     }
536 
537     public void setMotivation4( boolean _bMotivation4 )
538     {
539         this._bMotivation4 = _bMotivation4;
540     }
541 
542     public boolean getDemarche2( )
543     {
544         return _bDemarche2;
545     }
546 
547     public void setDemarche2( boolean _bDemarche2 )
548     {
549         this._bDemarche2 = _bDemarche2;
550     }
551 
552     public boolean getDemarche3( )
553     {
554         return _bDemarche3;
555     }
556 
557     public void setDemarche3( boolean _bDemarche3 )
558     {
559         this._bDemarche3 = _bDemarche3;
560     }
561 
562     public boolean getDemarche4( )
563     {
564         return _bDemarche4;
565     }
566 
567     public void setDemarche4( boolean _bDemarche4 )
568     {
569         this._bDemarche4 = _bDemarche4;
570     }
571 
572 }