Coverage Report - org.kuali.student.enrollment.acal.dto.CampusCalendarInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
CampusCalendarInfo
0%
0/23
0%
0/2
1.111
 
 1  
 /*
 2  
  * Copyright 2010 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  
 package org.kuali.student.enrollment.acal.dto;
 16  
 
 17  
 import java.io.Serializable;
 18  
 import java.util.Date;
 19  
 import java.util.List;
 20  
 
 21  
 import javax.xml.bind.annotation.XmlAccessType;
 22  
 import javax.xml.bind.annotation.XmlAccessorType;
 23  
 import javax.xml.bind.annotation.XmlAnyElement;
 24  
 import javax.xml.bind.annotation.XmlElement;
 25  
 import javax.xml.bind.annotation.XmlType;
 26  
 
 27  
 import org.kuali.student.enrollment.acal.infc.CampusCalendar;
 28  
 import org.kuali.student.r2.common.dto.KeyEntityInfo;
 29  
 import org.kuali.student.r2.common.infc.Attribute;
 30  
 import org.kuali.student.r2.common.infc.Meta;
 31  
 import org.kuali.student.r2.common.infc.RichText;
 32  
 import org.w3c.dom.Element;
 33  
 
 34  
 @XmlAccessorType(XmlAccessType.FIELD)
 35  
 @XmlType(name = "CampusCalendarInfo", propOrder = { "key", "typeKey",
 36  
                 "stateKey", "name", "descr", "startDate", "endDate", "location",
 37  
                 "meta", "attributes", "_futureElements" })
 38  
 public class CampusCalendarInfo extends KeyEntityInfo implements
 39  
                 CampusCalendar, Serializable {
 40  
 
 41  
         private static final long serialVersionUID = 1L;
 42  
         @XmlElement
 43  
         private String location;
 44  
         @XmlElement
 45  
         private Date startDate;
 46  
         @XmlElement
 47  
         private Date endDate;
 48  
         @XmlAnyElement
 49  
         private List<Element> _futureElements;
 50  
 
 51  
         public static CampusCalendarInfo newInstance() {
 52  0
                 return new CampusCalendarInfo();
 53  
         }
 54  
 
 55  0
         public CampusCalendarInfo() {
 56  0
                 location = null;
 57  0
                 _futureElements = null;
 58  0
                 setStartDate(null);
 59  0
                 setEndDate(null);
 60  0
         }
 61  
 
 62  
         /**
 63  
          * Constructs a new CampusCalendarInfo from another CampusCalendar.
 64  
          * 
 65  
          * @param campusCalendar
 66  
          *            the Campus Calendar to copy
 67  
          */
 68  
         public CampusCalendarInfo(CampusCalendar campusCalendar) {
 69  0
                 super(campusCalendar);
 70  0
                 if (null != campusCalendar) {
 71  0
                         this.location = campusCalendar.getLocation();
 72  0
                         this.startDate = new Date (campusCalendar.getStartDate().getTime());
 73  0
                         this.endDate = new Date(campusCalendar.getEndDate().getTime());
 74  0
                         _futureElements = null;
 75  
                 }
 76  0
         }
 77  
 
 78  
         @Override
 79  
         public String getLocation() {
 80  0
                 return location;
 81  
         }
 82  
 
 83  
         public void setLocation(String location) {
 84  0
                 this.location = location;
 85  0
         }
 86  
 
 87  
         @Override
 88  
         public Date getStartDate() {
 89  0
                 return startDate;
 90  
         }
 91  
 
 92  
         public void setStartDate(Date startDate) {
 93  0
                 this.startDate = startDate;
 94  0
         }
 95  
 
 96  
         @Override
 97  
         public Date getEndDate() {
 98  
 
 99  0
                 return endDate;
 100  
         }
 101  
 
 102  
         public void setEndDate(Date endDate) {
 103  0
                 this.endDate = endDate;
 104  0
         }
 105  
 }