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 java.util.LinkedHashMap;
19
20 import javax.persistence.Column;
21 import javax.persistence.Entity;
22 import javax.persistence.Id;
23 import javax.persistence.Table;
24
25 import org.apache.commons.lang.ObjectUtils;
26 import org.kuali.rice.core.jpa.annotations.Sequence;
27 import org.kuali.rice.kew.bo.KewPersistableBusinessObjectBase;
28
29
30
31
32
33 @Entity
34 @Table(name="KREW_RULE_EXPR_T")
35 @Sequence(name="KREW_RULE_EXPR_S", property="id")
36 public class RuleExpressionDef extends KewPersistableBusinessObjectBase {
37
38
39
40
41 @Id
42 @Column(name="RULE_EXPR_ID")
43 private Long id;
44
45
46
47 @Column(name="TYP")
48 private String type;
49
50
51
52 @Column(name="RULE_EXPR", nullable=true)
53 private String expression;
54
55
56
57 public Long getId() {
58 return this.id;
59 }
60
61
62
63 public void setId(Long id) {
64 this.id = id;
65 }
66
67
68
69 public String getType() {
70 return this.type;
71 }
72
73
74
75 public void setType(String type) {
76 this.type = type;
77 }
78
79
80
81 public String getExpression() {
82 return this.expression;
83 }
84
85
86
87 public void setExpression(String expression) {
88 this.expression = expression;
89 }
90
91
92
93
94
95
96
97 @Override
98 public boolean equals(Object obj) {
99 if (obj == null) return false;
100 if (!(obj instanceof RuleExpressionDef)) return false;
101 RuleExpressionDef arg = (RuleExpressionDef) obj;
102 return ObjectUtils.equals(type, arg.getType()) && ObjectUtils.equals(expression, arg.getExpression());
103 }
104
105
106
107
108
109 @Override
110 protected LinkedHashMap toStringMapper() {
111 LinkedHashMap map = new LinkedHashMap();
112 map.put("type", type);
113 map.put("expression", expression);
114 return map;
115 }
116
117
118 }