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 org.kuali.rice.core.api.util.KeyValue;
19 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
20 import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
21
22 import javax.persistence.AttributeOverride;
23 import javax.persistence.Column;
24 import javax.persistence.GeneratedValue;
25 import javax.persistence.Id;
26 import javax.persistence.MappedSuperclass;
27
28
29
30
31
32
33 @MappedSuperclass
34 @AttributeOverride(name="objectId", column=@Column(name="VAL", updatable = false, insertable = false))
35 public abstract class State extends PersistableBusinessObjectBase implements KeyValue {
36 @Id
37 @PortableSequenceGenerator(name="KREW_RTE_NODE_S")
38 @GeneratedValue(generator="KREW_RTE_NODE_S")
39 protected String stateId;
40 @Column(name="KEY_CD")
41 private String key;
42 @Column(name="VAL")
43 private String value;
44
45 public State() {}
46
47 public State(String key, String value) {
48 this.key = key;
49 this.value = value;
50 }
51
52 public String getStateId() {
53 return stateId;
54 }
55
56 public void setStateId(String stateId) {
57 this.stateId = stateId;
58 }
59
60 @Override
61 public String getKey() {
62 return key;
63 }
64
65 @Override
66 public String getValue() {
67 return value;
68 }
69
70 public void setKey(String key) {
71 this.key = key;
72 }
73
74 public void setValue(String value) {
75 this.value = value;
76 }
77
78 @Override
79 public String toString(){
80 return "stateId: " +getStateId();
81 }
82 }