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