1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif.modifier;
17
18 import org.kuali.rice.krad.datadictionary.parse.BeanTag;
19 import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
20 import org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase;
21 import org.kuali.rice.krad.uif.component.Ordered;
22
23 import java.io.Serializable;
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 @BeanTag(name = "compareConfig-bean", parent = "Uif-CompareConfig")
44 public class ComparableInfo extends UifDictionaryBeanBase implements Serializable, Ordered, Cloneable {
45 private static final long serialVersionUID = -5926058412202550266L;
46
47 private String bindingObjectPath;
48 private String headerText;
49 private boolean readOnly;
50
51 private int order;
52 private String idSuffix;
53
54 private boolean compareToForValueChange;
55 private boolean highlightValueChange;
56
57 public ComparableInfo() {
58 super();
59
60 readOnly = false;
61 compareToForValueChange = false;
62 highlightValueChange = true;
63 }
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82 @BeanTagAttribute(name="bindingObjectPath")
83 public String getBindingObjectPath() {
84 return this.bindingObjectPath;
85 }
86
87
88
89
90
91
92 public void setBindingObjectPath(String bindingObjectPath) {
93 this.bindingObjectPath = bindingObjectPath;
94 }
95
96
97
98
99
100
101
102
103
104
105
106
107
108 @BeanTagAttribute(name="headerText")
109 public String getHeaderText() {
110 return this.headerText;
111 }
112
113
114
115
116
117
118 public void setHeaderText(String headerText) {
119 this.headerText = headerText;
120 }
121
122
123
124
125
126
127
128 @BeanTagAttribute(name="readOnly")
129 public boolean isReadOnly() {
130 return this.readOnly;
131 }
132
133
134
135
136
137
138 public void setReadOnly(boolean readOnly) {
139 this.readOnly = readOnly;
140 }
141
142
143
144
145
146
147
148
149
150
151
152
153
154 @BeanTagAttribute(name="order")
155 public int getOrder() {
156 return this.order;
157 }
158
159
160
161
162
163
164 public void setOrder(int order) {
165 this.order = order;
166 }
167
168
169
170
171
172
173
174
175
176
177
178
179 @BeanTagAttribute(name="idSuffix")
180 public String getIdSuffix() {
181 return this.idSuffix;
182 }
183
184
185
186
187
188
189 public void setIdSuffix(String idSuffix) {
190 this.idSuffix = idSuffix;
191 }
192
193
194
195
196
197
198
199
200
201 @BeanTagAttribute(name="compareToForValueChange")
202 public boolean isCompareToForValueChange() {
203 return this.compareToForValueChange;
204 }
205
206
207
208
209
210
211 public void setCompareToForValueChange(boolean compareToForValueChange) {
212 this.compareToForValueChange = compareToForValueChange;
213 }
214
215
216
217
218
219
220
221
222
223
224
225 @BeanTagAttribute(name="highlightValueChange")
226 public boolean isHighlightValueChange() {
227 return this.highlightValueChange;
228 }
229
230
231
232
233
234
235 public void setHighlightValueChange(boolean highlightValueChange) {
236 this.highlightValueChange = highlightValueChange;
237 }
238
239
240
241
242
243
244 public <T extends ComparableInfo> T clone() {
245 try {
246 T clonedClass = (T)this.getClass().newInstance();
247 clonedClass = (T)copyProperties(clonedClass);
248
249 return clonedClass;
250 }
251 catch(Exception exception) {
252 throw new RuntimeException();
253 }
254 }
255
256 protected ComparableInfo copyProperties(Cloneable comparableInfo) {
257 ComparableInfo comparableInfoCopy = (ComparableInfo) comparableInfo;
258 comparableInfoCopy.setBindingObjectPath(this.bindingObjectPath);
259 comparableInfoCopy.setCompareToForValueChange(this.compareToForValueChange);
260 comparableInfoCopy.setHeaderText(this.headerText);
261 comparableInfoCopy.setHighlightValueChange(this.highlightValueChange);
262 comparableInfoCopy.setIdSuffix(this.idSuffix);
263 comparableInfoCopy.setOrder(this.order);
264 comparableInfoCopy.setReadOnly(this.readOnly);
265
266 return comparableInfoCopy;
267 }
268
269 protected <T> void copyProperties(T comparableInfo) {
270 super.copyProperties(comparableInfo);
271 ComparableInfo comparableInfoCopy = (ComparableInfo) comparableInfo;
272 comparableInfoCopy.setBindingObjectPath(this.bindingObjectPath);
273 comparableInfoCopy.setCompareToForValueChange(this.compareToForValueChange);
274 comparableInfoCopy.setHeaderText(this.headerText);
275 comparableInfoCopy.setHighlightValueChange(this.highlightValueChange);
276 comparableInfoCopy.setIdSuffix(this.idSuffix);
277 comparableInfoCopy.setOrder(this.order);
278 comparableInfoCopy.setReadOnly(this.readOnly);
279 }
280 }