Coverage Report - org.kuali.student.enrollment.class1.lpr.model.LprAttributeEntity
 
Classes in this File Line Coverage Branch Coverage Complexity
LprAttributeEntity
0%
0/23
N/A
1
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the Educational Community
 3  
  * License, Version 2.0 (the "License"); you may not use this file except in
 4  
  * compliance with the License. You may obtain a copy of the License at
 5  
  * http://www.osedu.org/licenses/ECL-2.0 Unless required by applicable law or
 6  
  * agreed to in writing, software distributed under the License is distributed
 7  
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 8  
  * express or implied. See the License for the specific language governing
 9  
  * permissions and limitations under the License.
 10  
  */
 11  
 
 12  
 package org.kuali.student.enrollment.class1.lpr.model;
 13  
 
 14  
 import javax.persistence.Entity;
 15  
 import javax.persistence.JoinColumn;
 16  
 import javax.persistence.ManyToOne;
 17  
 import javax.persistence.Table;
 18  
 
 19  
 import org.kuali.student.r2.common.entity.BaseAttributeEntity;
 20  
 import org.kuali.student.r2.common.entity.BaseAttributeEntityNew;
 21  
 import org.kuali.student.r2.common.infc.Attribute;
 22  
 
 23  0
 @Entity
 24  
 @Table(name = "KSEN_LPR_ATTR")
 25  
 public class LprAttributeEntity extends BaseAttributeEntityNew<LprEntity> {
 26  
 
 27  
     @ManyToOne
 28  
     @JoinColumn(name = "OWNER_ID")
 29  
     private LprEntity owner;
 30  
 
 31  0
     public LprAttributeEntity() {}
 32  
 
 33  
     public LprAttributeEntity(String key, String value) {
 34  0
         super(key, value);
 35  0
     }
 36  
 
 37  
     public LprAttributeEntity(Attribute att) {
 38  0
         super(att);
 39  0
     }
 40  
 
 41  
     @Override
 42  
     public void setOwner(LprEntity owner) {
 43  0
         this.owner = owner;
 44  0
     }
 45  
 
 46  
     @Override
 47  
     public LprEntity getOwner() {
 48  0
         return owner;
 49  
     }
 50  
     
 51  
     public void fromDto (Attribute att) {
 52  
             
 53  0
             setKey(att.getKey());
 54  0
             setValue(att.getValue());
 55  0
     }
 56  
 
 57  
         @Override
 58  
         public String toString() {
 59  0
                 StringBuilder builder = new StringBuilder();
 60  0
                 builder.append("LprAttributeEntity [owner=");
 61  0
                 builder.append(owner);
 62  0
                 builder.append(", id=");
 63  0
                 builder.append(getId());
 64  0
                 builder.append(", key=");
 65  0
                 builder.append(getKey());
 66  0
                 builder.append(", value=");
 67  0
                 builder.append(getValue());
 68  0
                 builder.append("]");
 69  0
                 return builder.toString();
 70  
         }
 71  
     
 72  
     
 73  
 }