Coverage Report - org.kuali.student.r2.core.appointment.dto.AppointmentSlotInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
AppointmentSlotInfo
0%
0/17
0%
0/6
1.375
 
 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  
 
 19  
 import org.kuali.student.r2.common.dto.IdNamelessEntityInfo;
 20  
 import org.kuali.student.r2.core.appointment.infc.AppointmentSlot;
 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  
 @XmlAccessorType(XmlAccessType.FIELD)
 32  
 @XmlType(name = "AppointmentSlotInfo", propOrder = {"id", "typeKey", "stateKey",
 33  
         "startDate", "endDate", "appointmentWindowId", "meta", "attributes", "_futureElements"})
 34  
 public class AppointmentSlotInfo extends IdNamelessEntityInfo implements AppointmentSlot {
 35  
 
 36  
     @XmlElement
 37  
     private Date startDate;
 38  
     @XmlElement
 39  
     private Date endDate;
 40  
     @XmlElement
 41  
     private String appointmentWindowId;
 42  
     @XmlAnyElement
 43  
     private List<Element> _futureElements;
 44  
 
 45  0
     public AppointmentSlotInfo() {
 46  
 
 47  0
     }
 48  
 
 49  
     public AppointmentSlotInfo(AppointmentSlot appointmentSlot) {
 50  0
         super(appointmentSlot);
 51  0
         if (null != appointmentSlot) {
 52  0
             this.startDate = (null != appointmentSlot.getStartDate()) ? new Date(appointmentSlot.getStartDate().getTime()) : null;
 53  0
             this.endDate = (null != appointmentSlot.getEndDate()) ? new Date(appointmentSlot.getEndDate().getTime()) : null;
 54  0
             this.appointmentWindowId = appointmentSlot.getAppointmentWindowId();
 55  
         }
 56  0
     }
 57  
 
 58  
     public void setStartDate(Date startDate) {
 59  0
         this.startDate = startDate;
 60  0
     }
 61  
 
 62  
 
 63  
     @Override
 64  
     public Date getStartDate() {
 65  0
         return this.startDate;
 66  
     }
 67  
 
 68  
     public void setEndDate(Date endDate) {
 69  0
         this.endDate = endDate;
 70  0
     }
 71  
 
 72  
     @Override
 73  
     public Date getEndDate() {
 74  0
         return this.endDate;
 75  
     }
 76  
 
 77  
     public void setAppointmentWindowId(String appointmentWindowId) {
 78  0
         this.appointmentWindowId = appointmentWindowId;
 79  0
     }
 80  
 
 81  
     @Override
 82  
     public String getAppointmentWindowId() {
 83  0
         return this.appointmentWindowId;
 84  
     }
 85  
 }