01: package org.directwebremoting.convert.mapped;
02:
03: import org.directwebremoting.util.CompareUtil;
04:
05: /**
06: * An example that is mapped to a bean
07: * @author Joe Walker [joe at getahead dot ltd dot uk]
08: */
09: public class BeanEx {
10: public BeanEx() {
11: }
12:
13: public BeanEx(String name) {
14: this .name = name;
15: }
16:
17: public String getName() {
18: return name;
19: }
20:
21: public void setName(String name) {
22: this .name = name;
23: }
24:
25: @Override
26: public String toString() {
27: return "BeanEx[" + name + "]";
28: }
29:
30: @Override
31: public boolean equals(Object obj) {
32: if (obj == null) {
33: return false;
34: }
35:
36: if (obj == this ) {
37: return true;
38: }
39:
40: if (!this .getClass().equals(obj.getClass())) {
41: return false;
42: }
43:
44: BeanEx that = (BeanEx) obj;
45:
46: if (!CompareUtil.equals(this .getName(), that.getName())) {
47: return false;
48: }
49:
50: return true;
51: }
52:
53: private String name;
54: }
|