2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.sdc.be.datatypes.elements;
23 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
25 public class HeatParameterDataDefinition extends ToscaDataDefinition {
36 public HeatParameterDataDefinition() {
39 public HeatParameterDataDefinition(HeatParameterDataDefinition hp) {
40 this.uniqueId = hp.uniqueId;
43 this.description = hp.description;
44 this.currentValue = hp.currentValue;
45 this.defaultValue = hp.defaultValue;
48 public String getUniqueId() {
52 public void setUniqueId(String uniqueId) {
53 this.uniqueId = uniqueId;
56 public String getName() {
60 public void setName(String name) {
64 public String getType() {
68 public void setType(String type) {
72 public String getDescription() {
76 public void setDescription(String description) {
77 this.description = description;
80 public String getCurrentValue() {
84 public void setCurrentValue(String currentValue) {
85 this.currentValue = currentValue;
88 public String getDefaultValue() {
92 public void setDefaultValue(String defaultValue) {
93 this.defaultValue = defaultValue;
97 public String toString() {
98 return "HeatParameterDataDefinition [uniqueId=" + uniqueId + ", name=" + name + ", type=" + type
99 + ", description=" + description + ", currentValue=" + currentValue + ", defaultValue=" + defaultValue
104 public int hashCode() {
105 final int prime = 31;
107 result = prime * result + ((currentValue == null) ? 0 : currentValue.hashCode());
108 result = prime * result + ((defaultValue == null) ? 0 : defaultValue.hashCode());
109 result = prime * result + ((description == null) ? 0 : description.hashCode());
110 result = prime * result + ((name == null) ? 0 : name.hashCode());
111 result = prime * result + ((type == null) ? 0 : type.hashCode());
112 result = prime * result + ((uniqueId == null) ? 0 : uniqueId.hashCode());
117 public boolean equals(Object obj) {
122 if (getClass() != obj.getClass())
124 HeatParameterDataDefinition other = (HeatParameterDataDefinition) obj;
125 if (currentValue == null) {
126 if (other.currentValue != null)
128 } else if (!currentValue.equals(other.currentValue))
130 if (defaultValue == null) {
131 if (other.defaultValue != null)
133 } else if (!defaultValue.equals(other.defaultValue))
135 if (description == null) {
136 if (other.description != null)
138 } else if (!description.equals(other.description))
141 if (other.name != null)
143 } else if (!name.equals(other.name))
146 if (other.type != null)
148 } else if (!type.equals(other.type))
150 if (uniqueId == null) {
151 if (other.uniqueId != null)
153 } else if (!uniqueId.equals(other.uniqueId))