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