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: */
20: public class ClassBPrime {
21: /** */
22: private String rue;
23:
24: /** */
25: private String ville;
26:
27: /** */
28: private ClassAPrime parent;
29:
30: /** */
31: private int prime = 31;
32:
33: /** {@inheritDoc} */
34: public ClassAPrime getParent() {
35: return this .parent;
36: }
37:
38: /** {@inheritDoc} */
39: public void setParent(final ClassAPrime parent) {
40: this .parent = parent;
41: }
42:
43: /** {@inheritDoc} */
44: public String getRue() {
45: return this .rue;
46: }
47:
48: /** {@inheritDoc} */
49: public void setRue(final String rue) {
50: this .rue = rue;
51: }
52:
53: /** {@inheritDoc} */
54: public String getVille() {
55: return this .ville;
56: }
57:
58: /** {@inheritDoc} */
59: public void setVille(final String ville) {
60: this .ville = ville;
61: }
62:
63: /** {@inheritDoc} */
64: public int hashCode() {
65: int result = 1;
66: result = prime * result
67: + ((this .rue == null) ? 0 : this .rue.hashCode());
68: return result;
69: }
70:
71: /** {@inheritDoc} */
72: public boolean equals(final Object obj) {
73: if (this == obj) {
74: return true;
75: }
76: if (obj == null) {
77: return false;
78: }
79: if (this .getClass() != obj.getClass()) {
80: return false;
81: }
82: final ClassBPrime other = (ClassBPrime) obj;
83: if (this .rue == null) {
84: if (other.rue != null) {
85: return false;
86: }
87: } else if (!this .rue.equals(other.rue)) {
88: return false;
89: }
90: return true;
91: }
92: }
|