Coverage Report - org.kuali.student.enrollment.classII.acal.dto.CampusCalendarInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
CampusCalendarInfo
0%
0/15
0%
0/4
1.143
CampusCalendarInfo$Builder
0%
0/18
N/A
1.143
 
 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.classII.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.classII.acal.infc.CampusCalendar;
 28  
 import org.kuali.student.r2.common.dto.KeyEntityInfo;
 29  
 import org.kuali.student.r2.common.infc.ModelBuilder;
 30  
 import org.w3c.dom.Element;
 31  
 
 32  
 @XmlAccessorType(XmlAccessType.FIELD)
 33  
 @XmlType(name = "CampusCalendarInfo", propOrder = {"key", "typeKey", "stateKey", "name", "descr", "startDate", "endDate", "location", "metaInfo", "attributes", "_futureElements"})
 34  
 public class CampusCalendarInfo extends KeyEntityInfo implements CampusCalendar, Serializable {
 35  
 
 36  
     private static final long serialVersionUID = 1L;
 37  
     @XmlElement
 38  
     private final Date startDate;
 39  
     @XmlElement
 40  
     private final Date endDate;
 41  
     @XmlElement
 42  
     private final String location;
 43  
     @XmlAnyElement
 44  
     private final List<Element> _futureElements;
 45  
 
 46  0
     private CampusCalendarInfo() {
 47  0
         startDate = null;
 48  0
         endDate = null;
 49  0
         location = null;
 50  0
         _futureElements = null;
 51  0
     }
 52  
 
 53  
     /**
 54  
      * Constructs a new CampusCalendarInfo from another
 55  
      * CampusCalendar.
 56  
      *
 57  
      * @param campusCalendar the Campus Calendar to copy
 58  
      */
 59  
     public CampusCalendarInfo(CampusCalendar campusCalendar) {
 60  0
         super(campusCalendar);
 61  0
         this.startDate = null != campusCalendar.getStartDate() ? new Date(campusCalendar.getStartDate().getTime()) : null;
 62  0
         this.endDate = null != campusCalendar.getEndDate() ? new Date(campusCalendar.getEndDate().getTime()) : null;
 63  0
         this.location = campusCalendar.getLocation();
 64  0
         _futureElements = null;
 65  0
     }
 66  
 
 67  
     @Override
 68  
     public Date getStartDate() {
 69  0
         return startDate;
 70  
     }
 71  
 
 72  
     @Override
 73  
     public Date getEndDate() {
 74  0
         return endDate;
 75  
     }
 76  
 
 77  
     @Override
 78  
     public String getLocation() {
 79  0
         return location;
 80  
     }
 81  
 
 82  
     /**
 83  
      * The builder class for this CampusCalendarInfo.
 84  
      */
 85  0
     public static class Builder extends KeyEntityInfo.Builder implements ModelBuilder<CampusCalendarInfo>, CampusCalendar {
 86  
 
 87  
         private Date startDate;
 88  
         private Date endDate;
 89  
         private String location;
 90  
 
 91  
         /**
 92  
          * Constructs a new builder.
 93  
          */
 94  0
         public Builder() {
 95  0
         }
 96  
 
 97  
         /**
 98  
          * Constructs a new builder initialized from another CampusCalendar
 99  
          */
 100  
         public Builder(CampusCalendar campusCalendar) {
 101  0
             super(campusCalendar);
 102  0
             this.startDate = campusCalendar.getStartDate();
 103  0
             this.endDate = campusCalendar.getEndDate();
 104  0
             this.location = campusCalendar.getLocation();
 105  0
         }
 106  
 
 107  
         @Override
 108  
         public CampusCalendarInfo build() {
 109  0
             return new CampusCalendarInfo(this);
 110  
         }
 111  
 
 112  
         @Override
 113  
         public Date getStartDate() {
 114  0
             return startDate;
 115  
         }
 116  
 
 117  
         public void setStartDate(Date startDate) {
 118  0
             this.startDate = startDate;
 119  0
         }
 120  
 
 121  
         @Override
 122  
         public Date getEndDate() {
 123  0
             return endDate;
 124  
         }
 125  
 
 126  
         public void setEndDate(Date endDate) {
 127  0
             this.endDate = endDate;
 128  0
         }
 129  
 
 130  
         @Override
 131  
         public String getLocation() {
 132  0
             return location;
 133  
         }
 134  
 
 135  
         public void setLocation(String location) {
 136  0
             this.location = location;
 137  0
         }
 138  
     }
 139  
 }