Coverage Report - org.kuali.student.r2.core.scheduling.dto.MeetingTimeInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
MeetingTimeInfo
0%
0/21
0%
0/6
1.3
 
 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.scheduling.dto;
 17  
 
 18  
 import org.kuali.student.r2.common.dto.TimeAmountInfo;
 19  
 import org.kuali.student.r2.common.infc.TimeAmount;
 20  
 import org.kuali.student.r2.core.scheduling.infc.MeetingTime;
 21  
 import org.w3c.dom.Element;
 22  
 
 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.io.Serializable;
 29  
 import java.util.Date;
 30  
 import java.util.List;
 31  
 
 32  
 /**
 33  
  * @Version 2.0
 34  
  * @Author Sri komandur@uw.edu
 35  
  */
 36  
 @XmlAccessorType(XmlAccessType.FIELD)
 37  
 @XmlType(name = "MeetingTimeInfo", propOrder = {"id", "startDate", "duration", "roomId", "_futureElements"})
 38  
 public class MeetingTimeInfo implements MeetingTime, Serializable {
 39  
 
 40  
     @XmlElement
 41  
     private String id;
 42  
     @XmlElement
 43  
     private Date startDate;
 44  
     @XmlElement
 45  
     private TimeAmountInfo duration;
 46  
     @XmlElement
 47  
     private String roomId;
 48  
     @XmlAnyElement
 49  
     private List<Element> _futureElements;
 50  
 
 51  
 
 52  0
     public MeetingTimeInfo() {
 53  0
     }
 54  
     
 55  0
     public MeetingTimeInfo(MeetingTime meetingTime) {
 56  0
         if (null != meetingTime) {
 57  0
             this.id = meetingTime.getId();
 58  0
             this.startDate = (null != meetingTime.getStartDate()) ? new Date(meetingTime.getStartDate().getTime()) : null;
 59  0
             this.duration = (null != meetingTime.getDuration()) ? new TimeAmountInfo(meetingTime.getDuration()) : null;
 60  0
             this.roomId = meetingTime.getRoomId();
 61  
         }
 62  0
     }
 63  
 
 64  
     @Override
 65  
     public String getId() {
 66  0
         return this.id;
 67  
     }
 68  
 
 69  
     public void setId(String id) {
 70  0
         this.id = id;
 71  0
     }
 72  
 
 73  
     @Override
 74  
     public Date getStartDate() {
 75  0
         return this.startDate;
 76  
     }
 77  
 
 78  
     public void setStartDate(Date startDate) {
 79  0
         this.startDate = startDate;
 80  0
     }
 81  
 
 82  
     @Override
 83  
     public TimeAmount getDuration() {
 84  0
         return this.duration;
 85  
     }
 86  
 
 87  
     public void setDuration(TimeAmountInfo duration) {
 88  0
         this.duration = duration;
 89  0
     }
 90  
 
 91  
     @Override
 92  
     public String getRoomId() {
 93  0
         return this.roomId;
 94  
     }
 95  
 
 96  
     public void setRoomId(String roomId) {
 97  0
         this.roomId = roomId;
 98  0
     }
 99  
 }