01: package net.sf.dozer.util.mapping.vo.orphan;
02:
03: public class Child {
04: private Long id;
05: private String name;
06:
07: private Child() {
08: }
09:
10: public Child(Long id, String name) {
11: this .id = id;
12: this .name = name;
13: }
14:
15: public Long getId() {
16: return id;
17: }
18:
19: public void setId(Long id) {
20: this .id = id;
21: }
22:
23: public String getName() {
24: return name;
25: }
26:
27: public void setName(String name) {
28: this .name = name;
29: }
30:
31: public boolean equals(Object o) {
32: if (o instanceof Child) {
33: Child castObj = (Child) o;
34: return id.equals(castObj.getId());
35: }
36: return false;
37: }
38:
39: public int hashCode() {
40: return id.hashCode();
41: }
42: }
|