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