1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
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 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
@Entity |
39 | |
@Table(name="KREW_RTE_BRCH_PROTO_T") |
40 | |
|
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 | |
|
84 | |
public void beforeInsert(){ |
85 | 0 | OrmUtils.populateAutoIncValue(this, KEWServiceLocator.getEntityManagerFactory().createEntityManager()); |
86 | 0 | } |
87 | |
|
88 | |
} |
89 | |
|