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