1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kew.rule;
17
18 import org.apache.commons.lang.ObjectUtils;
19 import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
20
21 import javax.persistence.Column;
22 import javax.persistence.Entity;
23 import javax.persistence.FetchType;
24 import javax.persistence.GeneratedValue;
25 import javax.persistence.Id;
26 import javax.persistence.JoinColumn;
27 import javax.persistence.ManyToOne;
28 import javax.persistence.Table;
29 import javax.persistence.Version;
30 import java.io.Serializable;
31
32
33
34
35
36
37
38
39
40
41
42
43 @Entity
44 @Table(name="KREW_RULE_EXT_VAL_T")
45 public class RuleExtensionValue implements Serializable {
46
47 private static final long serialVersionUID = 8909789087052290261L;
48 @Id
49 @PortableSequenceGenerator(name="KREW_RTE_TMPL_S")
50 @GeneratedValue(generator="KREW_RTE_TMPL_S")
51 @Column(name="RULE_EXT_VAL_ID")
52 private String ruleExtensionValueId;
53
54 @Column(name="VAL")
55 private String value;
56 @Column(name="KEY_CD")
57 private String key;
58 @Version
59 @Column(name="VER_NBR")
60 private Integer lockVerNbr;
61
62 @ManyToOne(fetch=FetchType.EAGER)
63 @JoinColumn(name="RULE_EXT_ID", nullable = false)
64 private RuleExtensionBo extension;
65
66 public RuleExtensionValue() {
67 }
68
69 public RuleExtensionValue(String key, String value) {
70 this.key = key;
71 this.value = value;
72 }
73
74 public RuleExtensionBo getExtension() {
75 return extension;
76 }
77 public void setExtension(RuleExtensionBo extension) {
78 this.extension = extension;
79 }
80 public Integer getLockVerNbr() {
81 return lockVerNbr;
82 }
83 public void setLockVerNbr(Integer lockVerNbr) {
84 this.lockVerNbr = lockVerNbr;
85 }
86 public String getKey() {
87 return key;
88 }
89 public void setKey(String key) {
90 this.key = key;
91 }
92 public String getRuleExtensionValueId() {
93 return ruleExtensionValueId;
94 }
95 public void setRuleExtensionValueId(String ruleExtensionValueId) {
96 this.ruleExtensionValueId = ruleExtensionValueId;
97 }
98 public String getValue() {
99 return value;
100 }
101 public void setValue(String value) {
102 this.value = value;
103 }
104
105 public boolean equals(Object o) {
106 if (o == null) return false;
107 if (!(o instanceof RuleExtensionValue)) return false;
108 RuleExtensionValue pred = (RuleExtensionValue) o;
109 return ObjectUtils.equals(key, pred.key) && ObjectUtils.equals(value, pred.value);
110 }
111
112 public String toString() {
113 return "[RuleExtensionValue:"
114 + " ruleExtensionValueId=" + ruleExtensionValueId
115 + ", value=" + value
116 + ", key=" + key
117 + ", lockVerNbr=" + lockVerNbr
118 + "]";
119
120 }
121 }