1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
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 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
@Entity |
40 | |
@Table(name="KREW_RTE_BRCH_PROTO_T") |
41 | |
|
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 Long branchId; |
54 | |
@Column(name="BRCH_NM") |
55 | |
private String name; |
56 | |
@Version |
57 | |
@Column(name="VER_NBR") |
58 | |
private Integer lockVerNbr; |
59 | |
|
60 | |
public Long getBranchId() { |
61 | 0 | return branchId; |
62 | |
} |
63 | |
|
64 | |
public void setBranchId(Long 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 | |
|
85 | |
public void beforeInsert(){ |
86 | 0 | OrmUtils.populateAutoIncValue(this, KEWServiceLocator.getEntityManagerFactory().createEntityManager()); |
87 | 0 | } |
88 | |
|
89 | |
} |
90 | |
|