01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */package org.codehaus.xfire.aegis.inheritance.ws2.common;
19:
20: import org.codehaus.xfire.aegis.inheritance.ws2.common.pack1.ContentBean1;
21:
22: /**
23: * <br/>
24: *
25: * @author xfournet
26: */
27: public class ParentBean {
28: private String id;
29:
30: private ContentBean1 content;
31:
32: public ParentBean() {
33: }
34:
35: public ParentBean(String id, ContentBean1 content) {
36: this .id = id;
37: this .content = content;
38: }
39:
40: public String getId() {
41: return id;
42: }
43:
44: public void setId(String id) {
45: this .id = id;
46: }
47:
48: public ContentBean1 getContent() {
49: return content;
50: }
51:
52: public void setContent(ContentBean1 content) {
53: this .content = content;
54: }
55:
56: public String toString() {
57: return "[" + getClass().getName() + "] id=" + id
58: + "; content={" + content + "}";
59: }
60:
61: public boolean equals(Object o) {
62: if (this == o) {
63: return true;
64: }
65: if (o == null || getClass() != o.getClass()) {
66: return false;
67: }
68:
69: final ParentBean that = (ParentBean) o;
70:
71: if (content != null ? !content.equals(that.content)
72: : that.content != null) {
73: return false;
74: }
75: if (id != null ? !id.equals(that.id) : that.id != null) {
76: return false;
77: }
78:
79: return true;
80: }
81:
82: public int hashCode() {
83: int result;
84: result = id != null ? id.hashCode() : 0;
85: result = 29 * result
86: + (content != null ? content.hashCode() : 0);
87: return result;
88: }
89: }
|