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.business.planning; 35 36 import java.io.Serializable; 37 import java.util.List; 38 39 /** 40 * Business class of the working day 41 * 42 * @author Laurent Payen 43 * 44 */ 45 public final class WorkingDay implements Serializable 46 { 47 48 /** 49 * Serial version UID 50 */ 51 private static final long serialVersionUID = 2628086182559019071L; 52 53 /** 54 * Id of the working day 55 */ 56 private int _nIdWorkingDay; 57 58 /** 59 * Day of the week 60 */ 61 private int _nDayOfWeek; 62 63 /** 64 * Id of the reservation rule. 65 */ 66 private int _nIdReservationRule; 67 68 /** 69 * List of the time slots of the working day 70 */ 71 private List<TimeSlot> _listTimeSlots; 72 73 /** 74 * Get the id of the working day 75 * 76 * @return the id of the working day 77 */ 78 public int getIdWorkingDay( ) 79 { 80 return _nIdWorkingDay; 81 } 82 83 /** 84 * Set the id of the working day 85 * 86 * @param nIdWorkingDay 87 * the id to set 88 */ 89 public void setIdWorkingDay( int nIdWorkingDay ) 90 { 91 this._nIdWorkingDay = nIdWorkingDay; 92 } 93 94 /** 95 * Get the day of week of the working day 96 * 97 * @return the day of week 98 */ 99 public int getDayOfWeek( ) 100 { 101 return _nDayOfWeek; 102 } 103 104 /** 105 * Set the day of week of the working day 106 * 107 * @param nDayOfWeek 108 * the day of week to set 109 */ 110 public void setDayOfWeek( int nDayOfWeek ) 111 { 112 this._nDayOfWeek = nDayOfWeek; 113 } 114 115 /** 116 * Get the id of the rule of the reservation 117 * 118 * @return the id of the rule of the reservation 119 */ 120 public int getIdReservationRule( ) 121 { 122 return _nIdReservationRule; 123 } 124 125 /** 126 * Set the id of the rule of the reservation 127 * 128 * @param nIdReservationRule 129 * the id to set 130 */ 131 public void setIdReservationRule( int nIdReservationRule ) 132 { 133 this._nIdReservationRule = nIdReservationRule; 134 } 135 136 /** 137 * Get the time slots of the working day 138 * 139 * @return the list of the time slots of the working day 140 */ 141 public List<TimeSlot> getListTimeSlot( ) 142 { 143 return _listTimeSlots; 144 } 145 146 /** 147 * Set the time slots of the working day 148 * 149 * @param listTimeSlots 150 * the list of time slots to set 151 */ 152 public void setListTimeSlot( List<TimeSlot> listTimeSlots ) 153 { 154 this._listTimeSlots = listTimeSlots; 155 } 156 157 }