Merge "Reorder modifiers"
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / TempNetworkHeatTemplateLookup.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
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=========================================================
19  */
20
21 package org.openecomp.mso.db.catalog.beans;
22
23 import java.io.Serializable;
24
25 import com.openpojo.business.annotation.BusinessKey;
26
27 public class TempNetworkHeatTemplateLookup implements Serializable {
28
29         @BusinessKey
30         private String networkResourceModelName = null;
31         @BusinessKey
32         private String heatTemplateArtifactUuid = null;
33         private String aicVersionMin = null;
34         private String aicVersionMax = null;
35     public static final long serialVersionUID = -1322322139926390329L;
36
37         public TempNetworkHeatTemplateLookup() {
38                 super();
39         }
40
41         public String getNetworkResourceModelName() {
42                 return this.networkResourceModelName;
43         }
44         public void setNetworkResourceModelName(String networkResourceModelName) {
45                 this.networkResourceModelName = networkResourceModelName;
46         }
47
48         public String getHeatTemplateArtifactUuid() {
49                 return this.heatTemplateArtifactUuid;
50         }
51         public void setHeatTemplateArtifactUuid(String heatTemplateArtifactUuid) {
52                 this.heatTemplateArtifactUuid = heatTemplateArtifactUuid;
53         }
54         public String getAicVersionMin() {
55                 return this.aicVersionMin;
56         }
57
58         public void setAicVersionMin(String aicVersionMin) {
59                 this.aicVersionMin = aicVersionMin;
60         }
61
62         public String getAicVersionMax() {
63                 return this.aicVersionMax;
64         }
65
66         public void setAicVersionMax(String aicVersionMax) {
67                 this.aicVersionMax = aicVersionMax;
68         }
69
70         @Override
71         public String toString() {
72                 return "NetworkResourceModelName=" + this.networkResourceModelName + "HeatTemplateArtifactUuid=" +
73                         this.heatTemplateArtifactUuid + "aicVersionMin=" + this.aicVersionMin + "aicVersionMax=" + this.aicVersionMax;
74         }
75
76         @Override
77     public boolean equals (Object o) {
78         if (!(o instanceof TempNetworkHeatTemplateLookup)) {
79             return false;
80         }
81         if (this == o) {
82             return true;
83         }
84         TempNetworkHeatTemplateLookup tnhtl = (TempNetworkHeatTemplateLookup) o;
85         if (tnhtl.getHeatTemplateArtifactUuid().equals(this.getHeatTemplateArtifactUuid()) && tnhtl.getNetworkResourceModelName().equals(this.getNetworkResourceModelName())) {
86             return true;
87         }
88         return false;
89     }
90
91     @Override
92     public int hashCode () {
93         // hash code does not have to be a unique result - only that two objects that should be treated as equal
94         // return the same value. so this should work.
95         int result;
96         result = (this.networkResourceModelName != null ? this.networkResourceModelName.hashCode() : 0) + (this.heatTemplateArtifactUuid != null ? this.heatTemplateArtifactUuid.hashCode() : 0);
97         return result;
98     }
99
100 }