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.Id;
 24  
 import javax.persistence.PrePersist;
 25  
 import javax.persistence.Table;
 26  
 import javax.persistence.Version;
 27  
 
 28  
 import org.kuali.rice.core.jpa.annotations.Sequence;
 29  
 import org.kuali.rice.core.util.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  
         @Column(name="RTE_BRCH_PROTO_ID")
 47  
         private Long branchId;
 48  
         @Column(name="BRCH_NM")
 49  
         private String name;
 50  
         @Version
 51  
         @Column(name="VER_NBR")
 52  
         private Integer lockVerNbr;
 53  
         
 54  
         public Long getBranchId() {
 55  0
                 return branchId;
 56  
         }
 57  
         
 58  
         public void setBranchId(Long branchId) {
 59  0
                 this.branchId = branchId;
 60  0
         }
 61  
         
 62  
         public String getName() {
 63  0
                 return name;
 64  
         }
 65  
         
 66  
         public void setName(String name) {
 67  0
                 this.name = name;
 68  0
         }
 69  
 
 70  
         public Integer getLockVerNbr() {
 71  0
                 return lockVerNbr;
 72  
         }
 73  
 
 74  
         public void setLockVerNbr(Integer lockVerNbr) {
 75  0
                 this.lockVerNbr = lockVerNbr;
 76  0
         }
 77  
         
 78  
         @PrePersist
 79  
         public void beforeInsert(){
 80  0
                 OrmUtils.populateAutoIncValue(this, KEWServiceLocator.getEntityManagerFactory().createEntityManager());                
 81  0
         }
 82  
         
 83  
 }
 84