01: package com.technoetic.xplanner.domain;
02:
03: import java.io.Serializable;
04:
05: public class Attribute implements Serializable {
06: private int targetId;
07: private String name;
08: private String value;
09:
10: public Attribute() {
11: }
12:
13: public Attribute(int targetId, String name, String value) {
14: this .targetId = targetId;
15: this .name = name;
16: this .value = value;
17: }
18:
19: public String getName() {
20: return name;
21: }
22:
23: public void setName(String name) {
24: this .name = name;
25: }
26:
27: public String getValue() {
28: return value;
29: }
30:
31: public void setValue(String value) {
32: this .value = value;
33: }
34:
35: public int getTargetId() {
36: return targetId;
37: }
38:
39: public void setTargetId(int targetId) {
40: this .targetId = targetId;
41: }
42:
43: public boolean equals(Object o) {
44: if (this == o)
45: return true;
46: if (!(o instanceof Attribute))
47: return false;
48:
49: final Attribute attribute = (Attribute) o;
50:
51: if (targetId != attribute.targetId)
52: return false;
53: if (name != null ? !name.equals(attribute.name)
54: : attribute.name != null)
55: return false;
56: if (value != null ? !value.equals(attribute.value)
57: : attribute.value != null)
58: return false;
59:
60: return true;
61: }
62:
63: public int hashCode() {
64: int result;
65: result = targetId;
66: result = 29 * result + (name != null ? name.hashCode() : 0);
67: result = 29 * result + (value != null ? value.hashCode() : 0);
68: return result;
69: }
70: }
|