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 java.io.Serializable;
25 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
27 public class HeatParameterDataDefinition extends ToscaDataDefinition implements Serializable {
32 private static final long serialVersionUID = 8995421762148502848L;
43 public HeatParameterDataDefinition() {
46 public HeatParameterDataDefinition(HeatParameterDataDefinition hp) {
47 this.uniqueId = hp.uniqueId;
50 this.description = hp.description;
51 this.currentValue = hp.currentValue;
52 this.defaultValue = hp.defaultValue;
55 public String getUniqueId() {
59 public void setUniqueId(String uniqueId) {
60 this.uniqueId = uniqueId;
63 public String getName() {
67 public void setName(String name) {
71 public String getType() {
75 public void setType(String type) {
79 public String getDescription() {
83 public void setDescription(String description) {
84 this.description = description;
87 public String getCurrentValue() {
91 public void setCurrentValue(String currentValue) {
92 this.currentValue = currentValue;
95 public String getDefaultValue() {
99 public void setDefaultValue(String defaultValue) {
100 this.defaultValue = defaultValue;
104 public String toString() {
105 return "HeatParameterDataDefinition [uniqueId=" + uniqueId + ", name=" + name + ", type=" + type
106 + ", description=" + description + ", currentValue=" + currentValue + ", defaultValue=" + defaultValue
111 public int hashCode() {
112 final int prime = 31;
114 result = prime * result + ((currentValue == null) ? 0 : currentValue.hashCode());
115 result = prime * result + ((defaultValue == null) ? 0 : defaultValue.hashCode());
116 result = prime * result + ((description == null) ? 0 : description.hashCode());
117 result = prime * result + ((name == null) ? 0 : name.hashCode());
118 result = prime * result + ((type == null) ? 0 : type.hashCode());
119 result = prime * result + ((uniqueId == null) ? 0 : uniqueId.hashCode());
124 public boolean equals(Object obj) {
129 if (getClass() != obj.getClass())
131 HeatParameterDataDefinition other = (HeatParameterDataDefinition) obj;
132 if (currentValue == null) {
133 if (other.currentValue != null)
135 } else if (!currentValue.equals(other.currentValue))
137 if (defaultValue == null) {
138 if (other.defaultValue != null)
140 } else if (!defaultValue.equals(other.defaultValue))
142 if (description == null) {
143 if (other.description != null)
145 } else if (!description.equals(other.description))
148 if (other.name != null)
150 } else if (!name.equals(other.name))
153 if (other.type != null)
155 } else if (!type.equals(other.type))
157 if (uniqueId == null) {
158 if (other.uniqueId != null)
160 } else if (!uniqueId.equals(other.uniqueId))