Coverage Report - org.kuali.student.r2.core.classI.atp.dto.AtpInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
AtpInfo
0%
0/12
N/A
1
AtpInfo$Builder
0%
0/14
N/A
1
 
 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.r2.core.classI.atp.dto;
 16  
 
 17  
 import java.io.Serializable;
 18  
 import java.util.Date;
 19  
 import java.util.List;
 20  
 import org.w3c.dom.Element;
 21  
 
 22  
 import javax.xml.bind.annotation.XmlAccessType;
 23  
 import javax.xml.bind.annotation.XmlAccessorType;
 24  
 import javax.xml.bind.annotation.XmlAnyElement;
 25  
 import javax.xml.bind.annotation.XmlElement;
 26  
 import javax.xml.bind.annotation.XmlType;
 27  
 
 28  
 import org.kuali.student.r2.common.dto.KeyEntityInfo;
 29  
 import org.kuali.student.r2.common.infc.ModelBuilder;
 30  
 import org.kuali.student.r2.core.classI.atp.infc.Atp;
 31  
 
 32  
 @XmlAccessorType(XmlAccessType.FIELD)
 33  
 @XmlType(name = "AtpInfo", propOrder = {"key", "typeKey", "stateKey", "name", "descr", "startDate", "endDate", "metaInfo", "attributes", "_futureElements"})
 34  
 public class AtpInfo extends KeyEntityInfo implements Atp, Serializable {
 35  
 
 36  
     private static final long serialVersionUID = 1L;
 37  
     @XmlElement
 38  
     private final Date startDate;
 39  
     @XmlElement
 40  
     private final Date endDate;
 41  
     @XmlAnyElement
 42  
     private final List<Element> _futureElements;
 43  
 
 44  0
     private AtpInfo() {
 45  0
         startDate = null;
 46  0
         endDate = null;
 47  0
         _futureElements = null;
 48  0
     }
 49  
 
 50  
     /**
 51  
      * Constructs a new AtpInfo from another Atp.
 52  
      *
 53  
      * @param atp the ATP to copy
 54  
      */
 55  
     public AtpInfo(Atp atp) {
 56  0
         super(atp);
 57  0
         this.startDate = atp.getStartDate();
 58  0
         this.endDate = atp.getEndDate();
 59  0
         _futureElements = null;
 60  0
     }
 61  
 
 62  
     @Override
 63  
     public Date getStartDate() {
 64  0
         return startDate;
 65  
     }
 66  
 
 67  
     @Override
 68  
     public Date getEndDate() {
 69  0
         return endDate;
 70  
     }
 71  
 
 72  
     /**
 73  
      * The builder class for this AtpInfo.
 74  
      */
 75  0
     public static class Builder extends KeyEntityInfo.Builder implements ModelBuilder<AtpInfo>, Atp {
 76  
 
 77  
         private Date startDate;
 78  
         private Date endDate;
 79  
 
 80  
         /**
 81  
          * Constructs a new builder.
 82  
          */
 83  0
         public Builder() {
 84  0
         }
 85  
 
 86  
         /**
 87  
          * Constructs a new builder initialized from another ATP.
 88  
          */
 89  
         public Builder(Atp atp) {
 90  0
             super(atp);
 91  0
             this.startDate = atp.getStartDate();
 92  0
             this.startDate = atp.getEndDate();
 93  0
         }
 94  
 
 95  
         @Override
 96  
         public AtpInfo build() {
 97  0
             return new AtpInfo(this);
 98  
         }
 99  
 
 100  
         @Override
 101  
         public Date getStartDate() {
 102  0
             return startDate;
 103  
         }
 104  
 
 105  
         public void setStartDate(Date startDate) {
 106  0
             this.startDate = startDate;
 107  0
         }
 108  
 
 109  
         @Override
 110  
         public Date getEndDate() {
 111  0
             return endDate;
 112  
         }
 113  
 
 114  
         public void setEndDate(Date endDate) {
 115  0
             this.endDate = endDate;
 116  0
         }
 117  
     }
 118  
 }