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