Coverage Report - org.kuali.student.enrollment.acal.dto.AcalEventInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
AcalEventInfo
0%
0/23
0%
0/6
1.3
 
 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.AcalEvent;
 28  
 import org.kuali.student.r2.common.dto.IdEntityInfo;
 29  
 
 30  
 import org.w3c.dom.Element;
 31  
 
 32  
 @XmlAccessorType(XmlAccessType.FIELD)
 33  
 @XmlType(name = "AcalEventInfo", propOrder = { 
 34  
                 "id", "typeKey", "stateKey", "name", "descr", 
 35  
                 "isAllDay", "isDateRange", "startDate", "endDate", 
 36  
                 "meta", "attributes", "_futureElements" })
 37  
 
 38  
 public class AcalEventInfo 
 39  
     extends IdEntityInfo 
 40  
     implements AcalEvent, Serializable {
 41  
 
 42  
     private static final long serialVersionUID = 1L;
 43  
     
 44  
     @XmlElement
 45  
     private Boolean isAllDay;
 46  
 
 47  
     @XmlElement
 48  
     private Boolean isDateRange;
 49  
 
 50  
     @XmlElement
 51  
     private Date startDate;
 52  
 
 53  
     @XmlElement
 54  
     private Date endDate;
 55  
 
 56  
     @XmlAnyElement
 57  
     private List<Element> _futureElements;
 58  
 
 59  
     /**
 60  
      * Constructs a new AcalEvent.
 61  
      */
 62  
     public AcalEventInfo() {
 63  0
         super();
 64  0
     }
 65  
 
 66  
     /**
 67  
      * Constructs a new AcalEventInfo from another AcalEvent.
 68  
      * 
 69  
      * @param acalEvent the AcalEvent to copy
 70  
      */
 71  
     public AcalEventInfo(AcalEvent acalEvent) {
 72  0
         super(acalEvent);
 73  0
         if (acalEvent != null) {
 74  0
             this.isAllDay = acalEvent.getIsAllDay();
 75  0
             this.isDateRange = acalEvent.getIsDateRange();
 76  
 
 77  0
             if (acalEvent.getStartDate() != null) {
 78  0
                 this.startDate = new Date(acalEvent.getStartDate().getTime());
 79  
             }
 80  
 
 81  0
             if (acalEvent.getEndDate() != null) {
 82  0
                 this.endDate = new Date(acalEvent.getEndDate().getTime());
 83  
             }
 84  
         }
 85  0
     }
 86  
     
 87  
     @Override
 88  
     public Boolean getIsAllDay() {
 89  0
         return isAllDay;
 90  
     }
 91  
 
 92  
     public void setIsAllDay(Boolean isAllDay) {
 93  0
         this.isAllDay = isAllDay;
 94  0
     }
 95  
     
 96  
     @Override
 97  
     public Boolean getIsDateRange() {
 98  0
         return isDateRange;
 99  
     }
 100  
     
 101  
     public void setIsDateRange(Boolean isDateRange) {
 102  0
         this.isDateRange = isDateRange;
 103  0
     }
 104  
     
 105  
     @Override
 106  
     public Date getStartDate() {
 107  0
         return startDate;
 108  
     }
 109  
     
 110  
     public void setStartDate(Date startDate) {
 111  0
         this.startDate = startDate;
 112  0
     }
 113  
     
 114  
     @Override
 115  
     public Date getEndDate() {
 116  0
         return endDate;
 117  
     }
 118  
     
 119  
     public void setEndDate(Date endDate) {
 120  0
         this.endDate = endDate;
 121  0
     }
 122  
 }