Coverage Report - org.kuali.student.r2.common.dto.TypeTypeRelationInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
TypeTypeRelationInfo
0%
0/31
0%
0/4
1.167
 
 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.XmlElement;
 26  
 import javax.xml.bind.annotation.XmlType;
 27  
 
 28  
 import org.kuali.student.r2.common.infc.TypeTypeRelation;
 29  
 import org.w3c.dom.Element;
 30  
 
 31  
 @SuppressWarnings("serial")
 32  
 @XmlAccessorType(XmlAccessType.FIELD)
 33  
 @XmlType(name = "TypeTypeRelationInfo", propOrder = {"key", "typeKey", "stateKey", "name", "descr", "effectiveDate", "expirationDate", "ownerTypeKey", "relatedTypeKey", "rank", "attributes", "meta", "_futureElements"})
 34  
 public class TypeTypeRelationInfo extends KeyEntityInfo implements TypeTypeRelation, Serializable {
 35  
         
 36  
           @XmlElement
 37  
         private Date effectiveDate;
 38  
         
 39  
         @XmlElement
 40  
         private Date expirationDate;
 41  
                 
 42  
         @XmlElement
 43  
         private String ownerTypeKey;
 44  
         
 45  
         @XmlElement
 46  
         private String relatedTypeKey;
 47  
 
 48  
         @XmlElement
 49  
         private Integer rank;
 50  
         
 51  
     @XmlAnyElement
 52  
     private List<Element> _futureElements;    
 53  
         
 54  0
     public TypeTypeRelationInfo() {
 55  0
                 effectiveDate = null;
 56  0
                 expirationDate = null;
 57  0
                 ownerTypeKey = null;
 58  0
                 relatedTypeKey = null;
 59  0
                 rank = null;
 60  0
                 _futureElements = null;
 61  0
         }
 62  
                 
 63  
         public TypeTypeRelationInfo(TypeTypeRelation typeTypeRel) {
 64  0
                 super(typeTypeRel);
 65  0
             this.effectiveDate = null != typeTypeRel.getEffectiveDate() ? new Date(typeTypeRel.getEffectiveDate().getTime()) : null;
 66  0
             this.expirationDate = null != typeTypeRel.getExpirationDate() ? new Date(typeTypeRel.getExpirationDate().getTime()) : null;
 67  0
             this.ownerTypeKey = typeTypeRel.getOwnerTypeKey();
 68  0
             this.relatedTypeKey = typeTypeRel.getRelatedTypeKey();
 69  0
             this.rank = typeTypeRel.getRank();
 70  0
             this._futureElements = null;
 71  0
         }
 72  
         
 73  
   
 74  
     @Override
 75  
     public Date getEffectiveDate() {
 76  0
         return effectiveDate;
 77  
     }
 78  
 
 79  
 
 80  
     public void setEffectiveDate(Date effectiveDate) {
 81  0
         this.effectiveDate = new Date(effectiveDate.getTime());
 82  0
     }
 83  
 
 84  
     @Override
 85  
     public Date getExpirationDate() {
 86  0
         return expirationDate;
 87  
     }
 88  
     
 89  
 
 90  
     public void setExpirationDate(Date expirationDate) {
 91  0
         this.expirationDate = new Date(expirationDate.getTime());
 92  0
     }
 93  
 
 94  
     @Override
 95  
     public String getOwnerTypeKey() {
 96  0
         return ownerTypeKey;
 97  
     }
 98  
 
 99  
     public void setOwnerTypeKey(String ownerTypeKey) {
 100  0
         this.ownerTypeKey = ownerTypeKey;
 101  0
     }
 102  
 
 103  
     @Override
 104  
     public String getRelatedTypeKey() {
 105  0
         return relatedTypeKey;
 106  
     }
 107  
 
 108  
     public void setRelatedTypeKey(String relatedTypeKey) {
 109  0
         this.relatedTypeKey = relatedTypeKey;
 110  0
     }
 111  
 
 112  
     @Override
 113  
     public Integer getRank() {
 114  0
         return rank;
 115  
     }
 116  
 
 117  
     public void setRank(int rank) {
 118  0
         this.rank = rank;
 119  0
     }
 120  
 }