Coverage Report - org.kuali.student.r2.core.appointment.dto.AppointmentWindowInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
AppointmentWindowInfo
0%
0/34
0%
0/8
1.25
 
 1  
 /*
 2  
  * Copyright 2012 The Kuali Foundation Licensed under the
 3  
  *  Educational Community License, Version 2.0 (the "License"); you may
 4  
  *  not use this file except in compliance with the License. You may
 5  
  *  obtain a copy of the License at
 6  
  *
 7  
  *   http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  *  Unless required by applicable law or agreed to in writing,
 10  
  *  software distributed under the License is distributed on an "AS IS"
 11  
  *  BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  *  or implied. See the License for the specific language governing
 13  
  *  permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.student.r2.core.appointment.dto;
 17  
 
 18  
 import org.kuali.student.r2.common.dto.IdEntityInfo;
 19  
 import org.kuali.student.r2.core.appointment.infc.AppointmentSlotRule;
 20  
 import org.kuali.student.r2.core.appointment.infc.AppointmentWindow;
 21  
 
 22  
 import javax.xml.bind.Element;
 23  
 import javax.xml.bind.annotation.XmlAccessType;
 24  
 import javax.xml.bind.annotation.XmlAccessorType;
 25  
 import javax.xml.bind.annotation.XmlAnyElement;
 26  
 import javax.xml.bind.annotation.XmlElement;
 27  
 import javax.xml.bind.annotation.XmlType;
 28  
 import java.util.Date;
 29  
 import java.util.List;
 30  
 
 31  0
 @XmlAccessorType(XmlAccessType.FIELD)
 32  
 @XmlType(name = "AppointmentWindowInfo", propOrder = {
 33  
         "id", "typeKey", "stateKey", "name", "descr",
 34  
         "startDate", "endDate", "slotRule", "periodMilestoneId", "assignedPopulationId", "assignedOrderTypeKey", "maxAppointmentsPerSlot",
 35  
         "meta", "attributes", "_futureElements"})
 36  
 public class AppointmentWindowInfo extends IdEntityInfo implements AppointmentWindow {
 37  
 
 38  
     @XmlElement
 39  
     private Date startDate;
 40  
     @XmlElement
 41  
     private Date endDate;
 42  
     @XmlElement
 43  
     private AppointmentSlotRuleInfo slotRule;
 44  
     @XmlElement
 45  
     private String periodMilestoneId;
 46  
     @XmlElement
 47  
     private String assignedPopulationId;
 48  
     @XmlElement
 49  
     private String assignedOrderTypeKey;
 50  
     @XmlElement
 51  
     private Integer maxAppointmentsPerSlot;
 52  
     @XmlAnyElement
 53  
     private List<Element> _futureElements;
 54  
 
 55  
 
 56  0
     public AppointmentWindowInfo() {
 57  
 
 58  0
     }
 59  
 
 60  
     public AppointmentWindowInfo(AppointmentWindow appointmentWindow) {
 61  0
         super(appointmentWindow);
 62  0
         if (null != appointmentWindow) {
 63  0
             this.startDate = (null != appointmentWindow.getStartDate()) ? new Date(appointmentWindow.getStartDate().getTime()) : null;
 64  0
             this.endDate = (null != appointmentWindow.getEndDate()) ? new Date(appointmentWindow.getEndDate().getTime()) : null;
 65  0
             this.slotRule = (null != appointmentWindow.getSlotRule()) ? new AppointmentSlotRuleInfo(appointmentWindow.getSlotRule()) : null;
 66  0
             this.periodMilestoneId = appointmentWindow.getPeriodMilestoneId();
 67  0
             this.assignedPopulationId = appointmentWindow.getAssignedPopulationId();
 68  0
             this.assignedOrderTypeKey = appointmentWindow.getAssignedOrderTypeKey();
 69  0
             this.maxAppointmentsPerSlot = appointmentWindow.getMaxAppointmentsPerSlot();
 70  
         }
 71  0
     }
 72  
 
 73  
     public void setStartDate(Date startDate) {
 74  0
         this.startDate = startDate;
 75  0
     }
 76  
 
 77  
     @Override
 78  
     public Date getStartDate() {
 79  0
         return this.startDate;
 80  
     }
 81  
 
 82  
     public void setEndDate(Date endDate) {
 83  0
         this.endDate = endDate;
 84  0
     }
 85  
 
 86  
     @Override
 87  
     public Date getEndDate() {
 88  0
         return this.endDate;
 89  
     }
 90  
 
 91  
     public void setSlotRule(AppointmentSlotRuleInfo slotRule) {
 92  0
         this.slotRule = slotRule;
 93  0
     }
 94  
 
 95  
     @Override
 96  
     public AppointmentSlotRuleInfo getSlotRule() {
 97  0
         return this.slotRule;
 98  
     }
 99  
 
 100  
     public void setPeriodMilestoneId(String periodMilestoneId) {
 101  0
         this.periodMilestoneId = periodMilestoneId;
 102  0
     }
 103  
 
 104  
     @Override
 105  
     public String getPeriodMilestoneId() {
 106  0
         return this.periodMilestoneId;
 107  
     }
 108  
 
 109  
     public void setAssignedPopulationId(String assignedPopulationId) {
 110  0
         this.assignedPopulationId = assignedPopulationId;
 111  0
     }
 112  
 
 113  
     @Override
 114  
     public String getAssignedPopulationId() {
 115  0
         return this.assignedPopulationId;
 116  
     }
 117  
 
 118  
     public void setAssignedOrderTypeKey(String assignedOrderTypeKey) {
 119  0
         this.assignedOrderTypeKey = assignedOrderTypeKey;
 120  0
     }
 121  
 
 122  
     @Override
 123  
     public String getAssignedOrderTypeKey() {
 124  0
         return this.assignedOrderTypeKey;
 125  
     }
 126  
 
 127  
 
 128  
     public void setMaxAppointmentsPerSlot(Integer maxPerSlot) {
 129  0
         this.maxAppointmentsPerSlot = maxPerSlot;
 130  0
     }
 131  
 
 132  
     @Override
 133  
     public Integer getMaxAppointmentsPerSlot() {
 134  0
         return this.maxAppointmentsPerSlot;
 135  
     }
 136  
 }