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