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-2007 The Kuali Foundation
 3  
  * 
 4  
  * 
 5  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 6  
  * you may not use this file except in compliance with the License.
 7  
  * You may obtain a copy of the License at
 8  
  * 
 9  
  * http://www.opensource.org/licenses/ecl2.php
 10  
  * 
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 package org.kuali.rice.kew.engine.node;
 18  
 
 19  
 import java.io.Serializable;
 20  
 
 21  
 import javax.persistence.Column;
 22  
 import javax.persistence.Entity;
 23  
 import javax.persistence.GeneratedValue;
 24  
 import javax.persistence.Id;
 25  
 import javax.persistence.Table;
 26  
 import javax.persistence.Version;
 27  
 
 28  
 import org.hibernate.annotations.GenericGenerator;
 29  
 import org.hibernate.annotations.Parameter;
 30  
 import org.kuali.rice.core.framework.persistence.jpa.OrmUtils;
 31  
 import org.kuali.rice.kew.service.KEWServiceLocator;
 32  
 
 33  
 /**
 34  
  * Represents a Branch in the definition of a DocumentType.  This should not be confused with the
 35  
  * {@link Branch} class which represents the actual instance of a branch on a document. 
 36  
  *
 37  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 38  
  */
 39  
 @Entity
 40  
 @Table(name="KREW_RTE_BRCH_PROTO_T")
 41  
 //@Sequence(name="KREW_RTE_NODE_S", property="branchId")
 42  0
 public class BranchPrototype implements Serializable {
 43  
 
 44  
         private static final long serialVersionUID = 8645994738204838275L;
 45  
     
 46  
     @Id
 47  
     @GeneratedValue(generator="KREW_RTE_NODE_S")
 48  
         @GenericGenerator(name="KREW_RTE_NODE_S",strategy="org.hibernate.id.enhanced.SequenceStyleGenerator",parameters={
 49  
                         @Parameter(name="sequence_name",value="KREW_RTE_NODE_S"),
 50  
                         @Parameter(name="value_column",value="id")
 51  
         })
 52  
         @Column(name="RTE_BRCH_PROTO_ID")
 53  
         private String branchId;
 54  
         @Column(name="BRCH_NM")
 55  
         private String name;
 56  
         @Version
 57  
         @Column(name="VER_NBR")
 58  
         private Integer lockVerNbr;
 59  
         
 60  
         public String getBranchId() {
 61  0
                 return branchId;
 62  
         }
 63  
         
 64  
         public void setBranchId(String branchId) {
 65  0
                 this.branchId = branchId;
 66  0
         }
 67  
         
 68  
         public String getName() {
 69  0
                 return name;
 70  
         }
 71  
         
 72  
         public void setName(String name) {
 73  0
                 this.name = name;
 74  0
         }
 75  
 
 76  
         public Integer getLockVerNbr() {
 77  0
                 return lockVerNbr;
 78  
         }
 79  
 
 80  
         public void setLockVerNbr(Integer lockVerNbr) {
 81  0
                 this.lockVerNbr = lockVerNbr;
 82  0
         }
 83  
         
 84  
         //@PrePersist
 85  
         public void beforeInsert(){
 86  0
                 OrmUtils.populateAutoIncValue(this, KEWServiceLocator.getEntityManagerFactory().createEntityManager());
 87  0
         }
 88  
         
 89  
 }
 90