Coverage Report - org.kuali.student.common.dto.KeyEntityInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
KeyEntityInfo
0%
0/7
N/A
1
KeyEntityInfo$Builder
0%
0/7
N/A
1
 
 1  
 /*
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the Educational
 3  
  * Community License, Version 2.0 (the "License"); you may not use
 4  
  * this file except in compliance with the License. You may obtain a
 5  
  * copy of the License at http://www.osedu.org/licenses/ECL-2.0 Unless
 6  
  * required by applicable law or agreed to in writing, software
 7  
  * distributed under the License is distributed on an "AS IS" BASIS,
 8  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 9  
  * implied. See the License for the specific language governing
 10  
  * permissions and limitations under the License.
 11  
  */
 12  
 
 13  
 package org.kuali.student.common.dto;
 14  
 
 15  
 import java.io.Serializable;
 16  
 
 17  
 import javax.xml.bind.annotation.XmlAccessType;
 18  
 import javax.xml.bind.annotation.XmlAccessorType;
 19  
 import javax.xml.bind.annotation.XmlAttribute;
 20  
 import javax.xml.bind.annotation.XmlElement;
 21  
 import javax.xml.bind.annotation.XmlTransient;
 22  
 
 23  
 import org.kuali.student.common.infc.KeyEntity;
 24  
 import org.kuali.student.common.dto.EntityInfo;
 25  
 
 26  
 @SuppressWarnings("serial")
 27  
 @XmlTransient
 28  
 public abstract class KeyEntityInfo extends EntityInfo implements KeyEntity, Serializable {
 29  
 
 30  
     @XmlAttribute
 31  
     private String key;
 32  
 
 33  0
     protected KeyEntityInfo() {
 34  0
         key = null;
 35  0
     }
 36  
 
 37  
     protected KeyEntityInfo(KeyEntity builder) {
 38  0
         super(builder);
 39  0
         this.key = builder.getKey();
 40  0
     }
 41  
 
 42  
     @Override
 43  
     public String getKey() {
 44  0
         return key;
 45  
     }
 46  
 
 47  
     /**
 48  
      * The builder class for this abstract EntityInfo.
 49  
      */
 50  
 
 51  
     public static class Builder extends EntityInfo.Builder implements  KeyEntity {
 52  
 
 53  
         private String key;
 54  
 
 55  0
         public Builder() {}
 56  
 
 57  
         public Builder(KeyEntity entity) {
 58  0
             super(entity);
 59  0
             this.key = entity.getKey();
 60  0
         }
 61  
 
 62  
         @Override
 63  
         public String getKey() {
 64  0
             return key;
 65  
         }
 66  
 
 67  
         public void setKey(String key) {
 68  0
             this.key = key;
 69  0
         }
 70  
     }
 71  
 }