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.NamedQueries; |
26 | |
import javax.persistence.NamedQuery; |
27 | |
import javax.persistence.Table; |
28 | |
import javax.persistence.Version; |
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
@Entity |
36 | |
@Table(name="KREW_RTE_NODE_INSTN_ST_T") |
37 | |
@AttributeOverride(name="stateId", column=@Column(name="RTE_NODE_INSTN_ST_ID")) |
38 | |
@NamedQueries({ |
39 | |
@NamedQuery(name="NodeState.FindNodeState", query="select n from NodeState as n where n.nodeInstance.routeNodeInstanceId = :routeNodeInstanceId and n.key = :key"), |
40 | |
@NamedQuery(name="NodeState.FindNodeStateById", query="select n from NodeState as n where n.stateId = :nodeStateId") |
41 | |
}) |
42 | |
public class NodeState extends State { |
43 | |
|
44 | |
private static final long serialVersionUID = -4382379569851955918L; |
45 | |
|
46 | |
@ManyToOne(fetch=FetchType.EAGER) |
47 | |
@JoinColumn(name="RTE_NODE_INSTN_ID") |
48 | |
private RouteNodeInstance nodeInstance; |
49 | |
@Version |
50 | |
@Column(name="VER_NBR") |
51 | |
private Integer lockVerNbr; |
52 | |
|
53 | 0 | public NodeState() {} |
54 | |
|
55 | |
public NodeState(String key, String value) { |
56 | 0 | super(key, value); |
57 | 0 | } |
58 | |
|
59 | |
public RouteNodeInstance getNodeInstance() { |
60 | 0 | return nodeInstance; |
61 | |
} |
62 | |
public void setNodeInstance(RouteNodeInstance nodeInstance) { |
63 | 0 | this.nodeInstance = nodeInstance; |
64 | 0 | } |
65 | |
|
66 | |
public Long getNodeStateId() { |
67 | 0 | return getStateId(); |
68 | |
} |
69 | |
|
70 | |
public void setNodeStateId(Long nodeStateId) { |
71 | 0 | setStateId(nodeStateId); |
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 | |
} |