Coverage Report - org.kuali.rice.kew.engine.node.RouteNodeConfigParam
 
Classes in this File Line Coverage Branch Coverage Complexity
RouteNodeConfigParam
0%
0/18
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.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.rice.kew.engine.node;
 17  
 
 18  
 import org.hibernate.annotations.GenericGenerator;
 19  
 import org.hibernate.annotations.Parameter;
 20  
 import org.kuali.rice.core.util.KeyValue;
 21  
 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
 22  
 
 23  
 import javax.persistence.*;
 24  
 
 25  
 /**
 26  
  * A route node definition configuration parameter.  RouteNodeConfigParameters are
 27  
  * extracted when the route node is parsed, and depend on route node implementation.
 28  
  * (well, they actually depend on the route node parser because the parser is what
 29  
  * will parse them, but the parser is not specialized per-node-type at this point) 
 30  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 31  
  *
 32  
  */
 33  
 @Entity
 34  
 @Table(name="KREW_RTE_NODE_CFG_PARM_T")
 35  
 @AttributeOverrides({@AttributeOverride(name="key", column=@Column(name="KEY_CD")), @AttributeOverride(name="value", column=@Column(name="VAL"))})
 36  
 public class RouteNodeConfigParam extends PersistableBusinessObjectBase implements KeyValue {
 37  
     private static final long serialVersionUID = 5592421070149273014L;
 38  
 
 39  
     /**
 40  
      * Primary key
 41  
      */ 
 42  
     @Id
 43  
         @Column(name="RTE_NODE_CFG_PARM_ID")
 44  
         @GeneratedValue(generator="KREW_RTE_NODE_CFG_PARM_S")
 45  
         @GenericGenerator(name="KREW_RTE_NODE_CFG_PARM_S",strategy="org.hibernate.id.enhanced.SequenceStyleGenerator",parameters={
 46  
                         @Parameter(name="sequence_name",value="KREW_RTE_NODE_CFG_PARM_S"),
 47  
                         @Parameter(name="value_column",value="id")
 48  
         })
 49  
     //@SequenceGenerator(name="KREW_RTE_NODE_CFG_PARM_SEQ_GEN", sequenceName="KREW_RTE_NODE_CFG_PARM_S")        
 50  
         private Long id;
 51  
         private String key;
 52  
     private String value;
 53  
     /**
 54  
      * Foreign key to routenode table
 55  
      */
 56  
     @ManyToOne(fetch=FetchType.EAGER)
 57  
         @JoinColumn(name="RTE_NODE_ID")
 58  
         private RouteNode routeNode;
 59  
 
 60  0
     public RouteNodeConfigParam() {}
 61  
 
 62  0
     public RouteNodeConfigParam(RouteNode routeNode, String key, String value) {
 63  0
             this.key = key;
 64  0
             this.value = value;
 65  0
         this.routeNode = routeNode;
 66  0
     }
 67  
 
 68  
     /**
 69  
      * @return the id
 70  
      */
 71  
     public Long getId() {
 72  0
         return this.id;
 73  
     }
 74  
     /**
 75  
      * @param id the id to set
 76  
      */
 77  
     public void setId(Long id) {
 78  0
         this.id = id;
 79  0
     }
 80  
     /**
 81  
      * @return the routeNode
 82  
      */
 83  
     public RouteNode getRouteNode() {
 84  0
         return this.routeNode;
 85  
     }
 86  
     /**
 87  
      * @param routeNode the routeNode to set
 88  
      */
 89  
     public void setRouteNode(RouteNode routeNode) {
 90  0
         this.routeNode = routeNode;
 91  0
     }
 92  
     
 93  
     @Override
 94  
     public String getKey() {
 95  0
             return key;
 96  
     }
 97  
     
 98  
     @Override
 99  
     public String getValue() {
 100  0
             return value;
 101  
     }
 102  
     
 103  
     public void setKey(String key) {
 104  0
                 this.key = key;
 105  0
         }
 106  
 
 107  
         public void setValue(String value) {
 108  0
                 this.value = value;
 109  0
         }
 110  
 }