Coverage Report - org.kuali.student.r2.common.dto.TypeInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
TypeInfo
0%
0/36
0%
0/4
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  
 
 16  
 package org.kuali.student.r2.common.dto;
 17  
 
 18  
 import java.io.Serializable;
 19  
 import java.util.Date;
 20  
 import java.util.List;
 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.XmlAttribute;
 26  
 import javax.xml.bind.annotation.XmlElement;
 27  
 import javax.xml.bind.annotation.XmlType;
 28  
 
 29  
 import org.kuali.student.r2.common.infc.Type;
 30  
 import org.w3c.dom.Element;
 31  
 
 32  
 @SuppressWarnings("serial")
 33  
 @XmlAccessorType(XmlAccessType.FIELD)
 34  
 @XmlType(name = "TypeInfo", propOrder = {"key", "name", "descr", "effectiveDate", "expirationDate", "refObjectURI", "attributes", "_futureElements"})
 35  
 public class TypeInfo extends HasAttributesInfo implements Type, Serializable {
 36  
         
 37  
     @XmlAttribute
 38  
         private String key;
 39  
         
 40  
         @XmlElement
 41  
         private String name;
 42  
         
 43  
         @XmlElement
 44  
         private String descr;
 45  
 
 46  
         @XmlElement
 47  
         private Date effectiveDate;
 48  
         
 49  
         @XmlElement
 50  
         private Date expirationDate;
 51  
         
 52  
         @XmlElement
 53  
         private String refObjectURI;
 54  
         
 55  
     @XmlAnyElement
 56  
     private List<Element> _futureElements;    
 57  
         
 58  
     
 59  0
         public TypeInfo() {
 60  0
                 key = null;
 61  0
                 name = null;
 62  0
                 descr = null;
 63  0
                 effectiveDate = null;
 64  0
                 expirationDate = null;
 65  0
                 refObjectURI = null;
 66  0
                 _futureElements = null;
 67  0
         }
 68  
                 
 69  
         public TypeInfo(Type type) {
 70  0
                 super(type);
 71  0
                 this.key = type.getKey();
 72  0
                 this.name = type.getName();
 73  0
                 this.descr = type.getDescr();
 74  0
             this.effectiveDate = null != type.getEffectiveDate() ? new Date(type.getEffectiveDate().getTime()) : null;
 75  0
             this.expirationDate = null != type.getExpirationDate() ? new Date(type.getExpirationDate().getTime()) : null;
 76  0
             this.refObjectURI = type.getRefObjectURI();
 77  0
             this._futureElements = null;
 78  0
         }
 79  
         
 80  
         @Override
 81  
     public String getKey() {
 82  0
         return key;
 83  
     }
 84  
 
 85  
     public void setKey(String key) {
 86  0
         this.key = key;
 87  0
     }
 88  
 
 89  
         @Override
 90  
     public String getName() {
 91  0
         return name;
 92  
     }
 93  
 
 94  
         
 95  
     public void setName(String name) {
 96  0
         this.name = name;
 97  0
     }
 98  
 
 99  
         @Override
 100  
     public String getDescr() {
 101  0
         return descr;
 102  
     }
 103  
 
 104  
         
 105  
     public void setDescr(String descr) {
 106  0
         this.descr = descr;
 107  0
     }
 108  
 
 109  
         @Override
 110  
     public Date getEffectiveDate() {
 111  0
         return effectiveDate;
 112  
     }
 113  
 
 114  
         
 115  
     public void setEffectiveDate(Date effectiveDate) {
 116  0
         this.effectiveDate = effectiveDate;
 117  0
     }
 118  
 
 119  
         @Override
 120  
     public Date getExpirationDate() {
 121  0
         return expirationDate;
 122  
     }
 123  
     
 124  
         
 125  
     public void setExpirationDate(Date expirationDate) {
 126  0
         this.expirationDate = expirationDate;
 127  0
     }
 128  
 
 129  
     @Override
 130  
     public String getRefObjectURI() {
 131  0
         return refObjectURI;
 132  
     }
 133  
 
 134  
         
 135  
     public void setRefObjectURI(String refObjectURI) {
 136  0
         this.refObjectURI = refObjectURI;
 137  0
     }
 138  
 }