01: package org.emforge.xfer;
02:
03: import org.apache.commons.lang.StringUtils;
04:
05: /** Transfer-Object for transitions
06: *
07: */
08: public class TransitionTO {
09: private String name;
10: private String label;
11:
12: /** Default empty constructor - required for passing TransitionTO via Web-Service */
13: public TransitionTO() {
14:
15: }
16:
17: public TransitionTO(String name, String label) {
18: this .name = name;
19: this .label = label;
20: }
21:
22: public String getName() {
23: return name;
24: }
25:
26: public void setName(String i_name) {
27: name = i_name;
28: }
29:
30: public String getLabel() {
31: return label;
32: }
33:
34: public void setLabel(String i_label) {
35: label = i_label;
36: }
37:
38: @Override
39: public boolean equals(Object i_obj) {
40: if (i_obj == null) {
41: return false;
42: }
43:
44: if (!(i_obj instanceof TransitionTO)) {
45: return false;
46: }
47:
48: TransitionTO transition = (TransitionTO) i_obj;
49:
50: // compare by names
51: return StringUtils.equals(name, transition.getName());
52: }
53:
54: }
|