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