01: /*
02: * Copyright 2005-2007 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package net.sf.dozer.functional_tests.recursive;
17:
18: /** */
19: public class ClassB {
20: /** */
21: private String rue;
22:
23: /** */
24: private String ville;
25:
26: /** */
27: private ClassA parent;
28:
29: /** */
30: private int prime = 31;
31:
32: /** {@inheritDoc} */
33: public ClassA getParent() {
34: return this .parent;
35: }
36:
37: /** {@inheritDoc} */
38: public void setParent(final ClassA parent) {
39: this .parent = parent;
40: }
41:
42: /** {@inheritDoc} */
43: public String getRue() {
44: return this .rue;
45: }
46:
47: /** {@inheritDoc} */
48: public void setRue(final String rue) {
49: this .rue = rue;
50: }
51:
52: /** {@inheritDoc} */
53: public String getVille() {
54: return this .ville;
55: }
56:
57: /** {@inheritDoc} */
58: public int hashCode() {
59: int result = 1;
60: result = prime * result
61: + ((this .rue == null) ? 0 : this .rue.hashCode());
62: return result;
63: }
64:
65: /** {@inheritDoc} */
66: public boolean equals(final Object obj) {
67: if (this == obj) {
68: return true;
69: }
70: if (obj == null) {
71: return false;
72: }
73: if (this .getClass() != obj.getClass()) {
74: return false;
75: }
76: final ClassB other = (ClassB) obj;
77: if (this .rue == null) {
78: if (other.rue != null) {
79: return false;
80: }
81: } else if (!this .rue.equals(other.rue)) {
82: return false;
83: }
84: return true;
85: }
86:
87: /** {@inheritDoc} */
88: public void setVille(final String ville) {
89: this.ville = ville;
90: }
91: }
|