| /* |
| * Copyright (c) 2016, 2020 Oracle and/or its affiliates. All rights reserved. |
| * |
| * This program and the accompanying materials are made available under the |
| * terms of the Eclipse Public License v. 2.0 which is available at |
| * http://www.eclipse.org/legal/epl-2.0, |
| * or the Eclipse Distribution License v. 1.0 which is available at |
| * http://www.eclipse.org/org/documents/edl-v10.php. |
| * |
| * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause |
| */ |
| |
| // Contributors: |
| // Ondrej Cerny |
| package org.eclipse.persistence.testing.jaxb.externalizedmetadata.xmlschema.namespace.linked.author; |
| |
| import org.eclipse.persistence.testing.jaxb.externalizedmetadata.xmlschema.namespace.linked.address.Address; |
| |
| public class Author { |
| public String firstName; |
| public String lastName; |
| public Address address; |
| |
| @Override |
| public int hashCode() { |
| // generated code by Eclipse IDE |
| final int prime = 31; |
| int result = 1; |
| result = prime * result + ((address == null) ? 0 : address.hashCode()); |
| result = prime * result + ((firstName == null) ? 0 : firstName.hashCode()); |
| result = prime * result + ((lastName == null) ? 0 : lastName.hashCode()); |
| return result; |
| } |
| |
| @Override |
| public boolean equals(Object obj) { |
| // generated code by Eclipse IDE |
| if (this == obj) { |
| return true; |
| } |
| if (obj == null) { |
| return false; |
| } |
| if (!(obj instanceof Author)) { |
| return false; |
| } |
| Author other = (Author) obj; |
| if (address == null) { |
| if (other.address != null) { |
| return false; |
| } |
| } else if (!address.equals(other.address)) { |
| return false; |
| } |
| if (firstName == null) { |
| if (other.firstName != null) { |
| return false; |
| } |
| } else if (!firstName.equals(other.firstName)) { |
| return false; |
| } |
| if (lastName == null) { |
| if (other.lastName != null) { |
| return false; |
| } |
| } else if (!lastName.equals(other.lastName)) { |
| return false; |
| } |
| return true; |
| } |
| } |