| /* |
| * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved. |
| * Copyright (c) 2005, 2015 SAP. 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: |
| // SAP - initial API and implementation |
| |
| package org.eclipse.persistence.testing.models.wdf.jpa1.component; |
| |
| public class MetricPk { |
| |
| private Long componentId; |
| private Long inspectionId; |
| private String name; |
| |
| public MetricPk(Long componentId, Long inspectionId, String name) { |
| super(); |
| this.componentId = componentId; |
| this.inspectionId = inspectionId; |
| this.name = name; |
| } |
| |
| public String getName() { |
| return name; |
| } |
| |
| public void setName(String name) { |
| this.name = name; |
| } |
| |
| public Long getComponentId() { |
| return componentId; |
| } |
| |
| public void setComponentId(Long componentId) { |
| this.componentId = componentId; |
| } |
| |
| public Long getInspectionId() { |
| return inspectionId; |
| } |
| |
| public void setInspectionId(Long inspectionId) { |
| this.inspectionId = inspectionId; |
| } |
| |
| @Override |
| public int hashCode() { |
| final int prime = 31; |
| int result = 1; |
| result = prime * result + ((componentId == null) ? 0 : componentId.hashCode()); |
| result = prime * result + ((inspectionId == null) ? 0 : inspectionId.hashCode()); |
| result = prime * result + ((name == null) ? 0 : name.hashCode()); |
| return result; |
| } |
| |
| @Override |
| public boolean equals(Object obj) { |
| if (this == obj) |
| return true; |
| if (obj == null) |
| return false; |
| if (getClass() != obj.getClass()) |
| return false; |
| final MetricPk other = (MetricPk) obj; |
| if (componentId == null) { |
| if (other.componentId != null) |
| return false; |
| } else if (!componentId.equals(other.componentId)) |
| return false; |
| if (inspectionId == null) { |
| if (other.inspectionId != null) |
| return false; |
| } else if (!inspectionId.equals(other.inspectionId)) |
| return false; |
| if (name == null) { |
| if (other.name != null) |
| return false; |
| } else if (!name.equals(other.name)) |
| return false; |
| return true; |
| } |
| |
| } |