01: package org.obe.worklist;
02:
03: import org.obe.xpdl.model.data.FormalParameter;
04: import org.obe.xpdl.model.data.Type;
05: import org.wfmc.wapi.WMAttribute;
06:
07: import java.io.Serializable;
08:
09: /**
10: * @author Adrian Price
11: */
12: public class AttributeBean implements Serializable {
13: private static final long serialVersionUID = 4344734829608500324L;
14:
15: private String _id;
16: private String _description;
17: private Type _type;
18: private int _length;
19: private Object _value;
20:
21: public AttributeBean() {
22: }
23:
24: public AttributeBean(String id, String description, Type type,
25: int length, Object value) {
26:
27: _id = id;
28: _description = description;
29: _type = type;
30: _length = length;
31: _value = value;
32: }
33:
34: public AttributeBean(FormalParameter parm, WMAttribute attr) {
35: _id = parm.getId();
36: _description = parm.getDescription();
37: _type = parm.getDataType().getType();
38: _length = attr.getLength();
39: _value = attr.getValue();
40: }
41:
42: public String getId() {
43: return _id;
44: }
45:
46: public String getDescription() {
47: return _description;
48: }
49:
50: public Type getType() {
51: return _type;
52: }
53:
54: public int getLength() {
55: return _length;
56: }
57:
58: public Object getValue() {
59: return _value;
60: }
61:
62: public void setValue(Object value) {
63: _value = value;
64: }
65:
66: public int hashCode() {
67: return _id == null ? 0 : _id.hashCode();
68: }
69:
70: public boolean equals(Object obj) {
71: AttributeBean that = (AttributeBean) obj;
72: return _id != null && _id.equals(that._id);
73: }
74: }
|