2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.mso.db.catalog.beans;
23 import java.io.Serializable;
25 import com.openpojo.business.annotation.BusinessKey;
27 // an embeddable class to represent the Composite key for NetworkResource in the 1707 db refactoring
28 public class HeatTemplateArtifactUuidModelUuid implements Serializable {
31 private String heatTemplateArtifactUuid = null;
33 private String modelUuid = null;
34 public static final long serialVersionUID = -1322322139926390329L;
36 public HeatTemplateArtifactUuidModelUuid() {
39 public String getHeatTemplateArtifactUuid() {
40 return this.heatTemplateArtifactUuid;
42 public void setHeatTemplateArtifactUuid(String heatTemplateArtifactUuid) {
43 this.heatTemplateArtifactUuid = heatTemplateArtifactUuid;
45 public String getModelUuid() {
46 return this.modelUuid;
48 public void setModelUuid(String modelUuid) {
49 this.modelUuid = modelUuid;
53 public String toString() {
54 return "heatTemplateArtifactUuid=" + this.heatTemplateArtifactUuid + " modelUuid=" + this.modelUuid;
58 public boolean equals (Object o) {
59 if (!(o instanceof HeatTemplateArtifactUuidModelUuid)) {
65 HeatTemplateArtifactUuidModelUuid htaumu = (HeatTemplateArtifactUuidModelUuid) o;
66 if (htaumu.getHeatTemplateArtifactUuid().equals(this.getHeatTemplateArtifactUuid())
67 && htaumu.getModelUuid().equals(this.getModelUuid())) {
74 public int hashCode () {
75 // hash code does not have to be a unique result - only that two objects that should be treated as equal
76 // return the same value. so this should work.
77 return this.heatTemplateArtifactUuid.hashCode() + this.modelUuid.hashCode();