Coverage Report - org.kuali.student.common.dto.EntityInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
EntityInfo
0%
0/16
N/A
1
EntityInfo$Builder
0%
0/19
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.XmlElement;
 18  
 import javax.xml.bind.annotation.XmlAttribute;
 19  
 import javax.xml.bind.annotation.XmlTransient;
 20  
 
 21  
 import org.kuali.student.common.infc.Entity;
 22  
 
 23  
 @SuppressWarnings("serial")
 24  
 @XmlTransient
 25  
 public abstract class EntityInfo extends HasAttributesAndMetaInfo implements Entity, Serializable {
 26  
 
 27  
     @XmlElement
 28  
     private String name;
 29  
 
 30  
     @XmlElement
 31  
     private RichTextInfo descr;
 32  
 
 33  
     @XmlAttribute
 34  
     private String typeKey;
 35  
 
 36  
     @XmlAttribute
 37  
     private String stateKey;
 38  
 
 39  
 
 40  
     protected EntityInfo() {
 41  0
         super ();
 42  0
         name = null;
 43  0
         descr = null;
 44  0
         typeKey = null;
 45  0
         stateKey = null;
 46  0
     }
 47  
 
 48  
     protected EntityInfo(Entity builder) {
 49  0
         super(builder);
 50  0
         this.name = builder.getName();
 51  0
         this.descr = builder.getDescr();
 52  0
         this.typeKey = builder.getTypeKey();
 53  0
         this.stateKey = builder.getStateKey();
 54  0
     }
 55  
 
 56  
     @Override
 57  
     public String getName() {
 58  0
         return name;
 59  
     }
 60  
 
 61  
     @Override
 62  
     public RichTextInfo getDescr() {
 63  0
         return descr;
 64  
     }
 65  
 
 66  
     @Override
 67  
     public String getTypeKey() {
 68  0
         return typeKey;
 69  
     }
 70  
 
 71  
     @Override
 72  
     public String getStateKey() {
 73  0
         return stateKey;
 74  
     }
 75  
 
 76  
     /**
 77  
      * The builder class for this abstract EntityInfo.
 78  
      */
 79  
 
 80  
     public static class Builder extends HasAttributesAndMetaInfo.Builder implements Entity {
 81  
 
 82  
         private String name;
 83  
         private RichTextInfo descr;
 84  
         private String typeKey;
 85  
         private String stateKey;
 86  
 
 87  0
         public Builder() {}
 88  
 
 89  
         public Builder(Entity entity) {
 90  0
             super(entity);
 91  0
             this.name = entity.getName();
 92  0
             this.descr = entity.getDescr();
 93  0
             this.typeKey = entity.getTypeKey();
 94  0
             this.stateKey = entity.getStateKey();
 95  0
         }
 96  
 
 97  
         @Override
 98  
         public String getName() {
 99  0
             return name;
 100  
         }
 101  
 
 102  
         public void setName(String name) {
 103  0
             this.name = name;
 104  0
         }
 105  
 
 106  
         @Override
 107  
         public RichTextInfo getDescr() {
 108  0
             return descr;
 109  
         }
 110  
 
 111  
         public void setDescr(RichTextInfo descr) {
 112  0
             this.descr = descr;
 113  0
         }
 114  
 
 115  
         @Override
 116  
         public String getTypeKey() {
 117  0
             return typeKey;
 118  
         }
 119  
 
 120  
         public void setTypeKey(String typeKey) {
 121  0
             this.typeKey = typeKey;
 122  0
         }
 123  
 
 124  
         @Override
 125  
         public String getStateKey() {
 126  0
             return stateKey;
 127  
         }
 128  
 
 129  
         public void setStateKey(String stateKey) {
 130  0
             this.stateKey = stateKey;
 131  0
         }
 132  
     }
 133  
 }