Coverage Report - org.kuali.student.enrollment.class1.lpr.model.LprTransactionItemRequestOptionEntity
 
Classes in this File Line Coverage Branch Coverage Complexity
LprTransactionItemRequestOptionEntity
0%
0/30
N/A
1
 
 1  
 /**
 2  
  * Copyright 2012 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the the Educational Community License, Version 1.0
 5  
  * (the "License"); you may not use this file except in compliance
 6  
  * with the License.  You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl1.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.student.enrollment.class1.lpr.model;
 17  
 
 18  
 import javax.persistence.Column;
 19  
 import javax.persistence.Embeddable;
 20  
 import javax.persistence.Entity;
 21  
 import javax.persistence.JoinColumn;
 22  
 import javax.persistence.ManyToOne;
 23  
 import javax.persistence.Table;
 24  
 
 25  
 import org.hibernate.annotations.Cascade;
 26  
 import org.kuali.student.enrollment.lpr.dto.LprTransactionItemRequestOptionInfo;
 27  
 import org.kuali.student.enrollment.lpr.infc.LprTransactionItemRequestOption;
 28  
 import org.kuali.student.r2.common.entity.MetaEntity;
 29  
 
 30  
 @Entity
 31  
 @Table(name="KSEN_LPR_TRANS_ITEM_RQST_OPT")
 32  
 public class LprTransactionItemRequestOptionEntity extends MetaEntity {
 33  
 
 34  
     @Column(name = "OPTION_KEY")
 35  
     private String optionKey;
 36  
 
 37  
     @Column(name = "OPTION_VALUE")
 38  
     private String optionValue;
 39  
 
 40  
     @ManyToOne 
 41  
     @JoinColumn (name="LPR_TRANS_ITEM_ID")
 42  
     private LprTransactionItemEntity lprTransactionItem;
 43  
     
 44  
     public LprTransactionItemRequestOptionEntity(
 45  0
                         LprTransactionItemRequestOption info) {
 46  
             
 47  0
             this.setObjectId(info.getId());
 48  
             
 49  0
             fromDto (info);
 50  
         
 51  0
     }
 52  
     
 53  
     
 54  
 
 55  
         public void fromDto(LprTransactionItemRequestOption info) {
 56  
                 
 57  0
                 this.setOptionKey(info.getOptionKey());
 58  0
                 this.setOptionValue(info.getOptionValue());
 59  
                 
 60  0
         }
 61  
 
 62  
 
 63  
 
 64  
         public String getOptionKey() {
 65  0
         return optionKey;
 66  
     }
 67  
 
 68  
     public void setOptionKey(String optionKey) {
 69  0
         this.optionKey = optionKey;
 70  0
     }
 71  
 
 72  
     public String getOptionValue() {
 73  0
         return optionValue;
 74  
     }
 75  
 
 76  
     public void setOptionValue(String optionValue) {
 77  0
         this.optionValue = optionValue;
 78  0
     }
 79  
 
 80  
         public LprTransactionItemEntity getLprTransactionItem() {
 81  0
                 return lprTransactionItem;
 82  
         }
 83  
 
 84  
         public void setLprTransactionItem(LprTransactionItemEntity lprTransactionItem) {
 85  0
                 this.lprTransactionItem = lprTransactionItem;
 86  0
         }
 87  
 
 88  
 
 89  
 
 90  
         public LprTransactionItemRequestOptionInfo toDto() {
 91  
                 
 92  0
                 LprTransactionItemRequestOptionInfo info = new LprTransactionItemRequestOptionInfo();
 93  
                 
 94  0
                 info.setId(getId());
 95  0
                 info.setOptionKey(getOptionKey());
 96  0
                 info.setOptionValue(getOptionValue());
 97  
                 
 98  0
                 return info;
 99  
         }
 100  
 
 101  
 
 102  
 
 103  
         @Override
 104  
         public String toString() {
 105  0
                 StringBuilder builder = new StringBuilder();
 106  0
                 builder.append("LprTransactionItemRequestOptionEntity [id=");
 107  0
                 builder.append(getId());
 108  0
                 builder.append(", optionKey=");
 109  0
                 builder.append(optionKey);
 110  0
                 builder.append(", optionValue=");
 111  0
                 builder.append(optionValue);
 112  0
                 builder.append("]");
 113  0
                 return builder.toString();
 114  
         }
 115  
 
 116  
     
 117  
 }