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.business.planning;
35  
36  import java.io.Serializable;
37  import java.util.List;
38  
39  import fr.paris.lutece.plugins.appointment.business.AbstractDateConversion;
40  
41  /**
42   * Business class of the definition week
43   * 
44   * @author Laurent Payen
45   *
46   */
47  public final class WeekDefinition extends AbstractDateConversion implements Serializable
48  {
49  
50      /**
51       * Serial version UID
52       */
53      private static final long serialVersionUID = 4292654762871322318L;
54  
55      /**
56       * Id of the week definition
57       */
58      private int _nIdWeekDefinition;
59  
60      /**
61       * Id of the form the week definition belongs to
62       */
63      private int _nIdForm;
64  
65      /**
66       * List of the working days that define the week definition
67       */
68      private List<WorkingDay> _listWorkingDays;
69  
70      /**
71       * Get the id of the week definition
72       * 
73       * @return the id of the week definition
74       */
75      public int getIdWeekDefinition( )
76      {
77          return _nIdWeekDefinition;
78      }
79  
80      /**
81       * Set the id of the week definition
82       * 
83       * @param _nIdWeekDefinition
84       *            the id to set
85       */
86      public void setIdWeekDefinition( int nIdWeekDefinition )
87      {
88          this._nIdWeekDefinition = nIdWeekDefinition;
89      }
90  
91      /**
92       * Get the form id the week definition belongs to
93       * 
94       * @return the form id
95       */
96      public int getIdForm( )
97      {
98          return _nIdForm;
99      }
100 
101     /**
102      * Set the form id the week definition belongs to
103      * 
104      * @param nIdForm
105      *            the form id to set
106      */
107     public void setIdForm( int nIdForm )
108     {
109         this._nIdForm = nIdForm;
110     }
111 
112     /**
113      * Get the list of the working days of the week
114      * 
115      * @return the list of the working days for the week
116      */
117     public List<WorkingDay> getListWorkingDay( )
118     {
119         return _listWorkingDays;
120     }
121 
122     /**
123      * Set the working days for the week
124      * 
125      * @param _listWorkingDays
126      *            the list o f working days to set
127      */
128     public void setListWorkingDay( List<WorkingDay> listWorkingDays )
129     {
130         this._listWorkingDays = listWorkingDays;
131     }
132 
133 }