939b0d1f1187a7fb6912c3961614c6d204c5175a
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / HeatTemplateParam.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * OPENECOMP - MSO
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 public class HeatTemplateParam implements Serializable {
26
27         private String heatTemplateArtifactUuid;
28         private String paramName;
29         private boolean required;
30         private String paramType;
31         private String paramAlias;
32     public static final long serialVersionUID = -1322322139926390329L;
33         
34         public HeatTemplateParam() {}
35         
36         public String getHeatTemplateArtifactUuid() {
37                 return this.heatTemplateArtifactUuid;
38         }
39         public void setHeatTemplateArtifactUuid(String heatTemplateArtifactUuid) {
40                 this.heatTemplateArtifactUuid = heatTemplateArtifactUuid;
41         }
42
43         public String getParamName() {
44                 return paramName;
45         }
46         public void setParamName(String paramName) {
47                 this.paramName = paramName;
48         }
49         public boolean isRequired() {
50                 return required;
51         }
52         public void setRequired(boolean required) {
53                 this.required = required;
54         }
55         public String getParamAlias() {
56                 return paramAlias;
57         }
58         public void setParamAlias(String paramAlias) {
59                 this.paramAlias = paramAlias;
60         }
61         
62         public String getParamType() {
63             return paramType;
64         }
65         public void setParamType (String paramType) {
66             this.paramType = paramType;
67         }
68         
69         
70         @Override
71         public String toString () {
72                 return "Param=" + paramName + ",type=" + paramType + ",required=" + required + ",paramAlias=" + paramAlias + ", heatTemplateArtifactUuid=" + this.heatTemplateArtifactUuid;
73         }
74         
75     @Override
76     public boolean equals (Object o) {
77         if (!(o instanceof HeatTemplateParam)) {
78             return false;
79         }
80         if (this == o) {
81             return true;
82         }
83         HeatTemplateParam htp = (HeatTemplateParam) o;
84         if (htp.getHeatTemplateArtifactUuid().equals(this.heatTemplateArtifactUuid) && htp.getParamName().equalsIgnoreCase(this.paramName)) {
85             return true;
86         }
87         return false;
88     }
89
90     @Override
91     public int hashCode () {
92         int result = 0;
93         result = this.paramName == null ? 0 : this.paramName.hashCode() + this.heatTemplateArtifactUuid == null ? 0 : this.heatTemplateArtifactUuid.hashCode();
94         return result;
95         }
96 }