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 javax.persistence.AttributeOverride; |
20 | |
import javax.persistence.Column; |
21 | |
import javax.persistence.Entity; |
22 | |
import javax.persistence.FetchType; |
23 | |
import javax.persistence.JoinColumn; |
24 | |
import javax.persistence.ManyToOne; |
25 | |
import javax.persistence.Table; |
26 | |
import javax.persistence.Version; |
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
@Entity |
34 | |
@Table(name="KREW_RTE_BRCH_ST_T") |
35 | |
@AttributeOverride(name="stateId", column=@Column(name="RTE_BRCH_ST_ID")) |
36 | |
public class BranchState extends State { |
37 | |
|
38 | |
|
39 | |
|
40 | |
|
41 | |
public static final String VARIABLE_PREFIX = "var::"; |
42 | |
|
43 | |
private static final long serialVersionUID = -7642477013444817952L; |
44 | |
|
45 | |
@ManyToOne(fetch=FetchType.EAGER) |
46 | |
@JoinColumn(name="RTE_BRCH_ID") |
47 | |
private Branch branch; |
48 | |
@Version |
49 | |
@Column(name="VER_NBR") |
50 | |
private Integer lockVerNbr; |
51 | |
|
52 | 0 | public BranchState() {} |
53 | |
|
54 | |
public BranchState(String key, String value) { |
55 | 0 | super(key, value); |
56 | 0 | } |
57 | |
|
58 | |
public Branch getBranch() { |
59 | 0 | return branch; |
60 | |
} |
61 | |
|
62 | |
public void setBranch(Branch branch) { |
63 | 0 | this.branch = branch; |
64 | 0 | } |
65 | |
|
66 | |
public Long getBranchStateId() { |
67 | 0 | return getStateId(); |
68 | |
} |
69 | |
|
70 | |
public void setBranchStateId(Long branchStateId) { |
71 | 0 | setStateId(branchStateId); |
72 | 0 | } |
73 | |
|
74 | |
public Integer getLockVerNbr() { |
75 | 0 | return lockVerNbr; |
76 | |
} |
77 | |
|
78 | |
public void setLockVerNbr(Integer lockVerNbr) { |
79 | 0 | this.lockVerNbr = lockVerNbr; |
80 | 0 | } |
81 | |
|
82 | |
public String toString() { |
83 | 0 | return "[BranchState: stateId=" + getStateId() + ", branch=" + branch + ", key=" + key + ", value=" + value + "]"; |
84 | |
} |
85 | |
|
86 | |
|
87 | |
} |
88 | |
|