Coverage Report - org.kuali.rice.kew.engine.node.BranchPrototype
 
Classes in this File Line Coverage Branch Coverage Complexity
BranchPrototype
0%
0/12
N/A
1
 
 1  
 /**
 2  
  * Copyright 2005-2011 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 java.io.Serializable;
 19  
 
 20  
 import javax.persistence.Column;
 21  
 import javax.persistence.Entity;
 22  
 import javax.persistence.GeneratedValue;
 23  
 import javax.persistence.Id;
 24  
 import javax.persistence.Table;
 25  
 import javax.persistence.Version;
 26  
 
 27  
 import org.hibernate.annotations.GenericGenerator;
 28  
 import org.hibernate.annotations.Parameter;
 29  
 import org.kuali.rice.core.framework.persistence.jpa.OrmUtils;
 30  
 import org.kuali.rice.kew.service.KEWServiceLocator;
 31  
 
 32  
 /**
 33  
  * Represents a Branch in the definition of a DocumentType.  This should not be confused with the
 34  
  * {@link Branch} class which represents the actual instance of a branch on a document. 
 35  
  *
 36  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 37  
  */
 38  
 @Entity
 39  
 @Table(name="KREW_RTE_BRCH_PROTO_T")
 40  
 //@Sequence(name="KREW_RTE_NODE_S", property="branchId")
 41  0
 public class BranchPrototype implements Serializable {
 42  
 
 43  
         private static final long serialVersionUID = 8645994738204838275L;
 44  
     
 45  
     @Id
 46  
     @GeneratedValue(generator="KREW_RTE_NODE_S")
 47  
         @GenericGenerator(name="KREW_RTE_NODE_S",strategy="org.hibernate.id.enhanced.SequenceStyleGenerator",parameters={
 48  
                         @Parameter(name="sequence_name",value="KREW_RTE_NODE_S"),
 49  
                         @Parameter(name="value_column",value="id")
 50  
         })
 51  
         @Column(name="RTE_BRCH_PROTO_ID")
 52  
         private String branchId;
 53  
         @Column(name="BRCH_NM")
 54  
         private String name;
 55  
         @Version
 56  
         @Column(name="VER_NBR")
 57  
         private Integer lockVerNbr;
 58  
         
 59  
         public String getBranchId() {
 60  0
                 return branchId;
 61  
         }
 62  
         
 63  
         public void setBranchId(String branchId) {
 64  0
                 this.branchId = branchId;
 65  0
         }
 66  
         
 67  
         public String getName() {
 68  0
                 return name;
 69  
         }
 70  
         
 71  
         public void setName(String name) {
 72  0
                 this.name = name;
 73  0
         }
 74  
 
 75  
         public Integer getLockVerNbr() {
 76  0
                 return lockVerNbr;
 77  
         }
 78  
 
 79  
         public void setLockVerNbr(Integer lockVerNbr) {
 80  0
                 this.lockVerNbr = lockVerNbr;
 81  0
         }
 82  
         
 83  
         //@PrePersist
 84  
         public void beforeInsert(){
 85  0
                 OrmUtils.populateAutoIncValue(this, KEWServiceLocator.getEntityManagerFactory().createEntityManager());
 86  0
         }
 87  
         
 88  
 }
 89