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;
27 public class GetInputValueDataDefinition extends ToscaDataDefinition {
29 private String propName;
30 private String inputName;
31 private String inputId;
32 private Integer indexValue;
33 private GetInputValueDataDefinition getInputIndex;
35 private boolean isList = false;
37 public GetInputValueDataDefinition(){
41 public GetInputValueDataDefinition(Map<String, Object> pr) {
45 public GetInputValueDataDefinition(GetInputValueDataDefinition p) {
46 this.setPropName(p.getPropName());
47 this.setInputName( p.getInputName());
48 this.setInputId( p.getInputId());
49 this.setIndexValue ( p.getIndexValue());
50 this.setGetInputIndex ( p.getGetInputIndex());
51 this.setList ( p.isList());
56 public String getPropName() {
60 public void setPropName(String propName) {
61 this.propName = propName;
64 public String getInputName() {
68 public void setInputName(String inputName) {
69 this.inputName = inputName;
72 public Integer getIndexValue() {
76 public void setIndexValue(Integer indexValue) {
77 this.indexValue = indexValue;
80 public GetInputValueDataDefinition getGetInputIndex() {
84 public void setGetInputIndex(GetInputValueDataDefinition getInputIndex) {
85 this.getInputIndex = getInputIndex;
88 public boolean isList() {
92 public void setList(boolean isList) {
97 public String getInputId() {
101 public void setInputId(String inputId) {
102 this.inputId = inputId;
106 public String toString() {
107 return "GetInputValueDataDefinition [propName=" + propName + ", inputName=" + inputName + ", indexValue=" + indexValue + ", getInputIndex=" + getInputIndex + ", isList=" + isList + "]";
111 public int hashCode() {
112 final int prime = 31;
114 result = prime * result + ((getInputIndex == null) ? 0 : getInputIndex.hashCode());
115 result = prime * result + ((indexValue == null) ? 0 : indexValue.hashCode());
116 result = prime * result + ((inputName == null) ? 0 : inputName.hashCode());
117 result = prime * result + (isList ? 1231 : 1237);
118 result = prime * result + ((propName == null) ? 0 : propName.hashCode());
123 public boolean equals(Object obj) {
128 if (getClass() != obj.getClass())
130 GetInputValueDataDefinition other = (GetInputValueDataDefinition) obj;
131 if (getInputIndex == null) {
132 if (other.getInputIndex != null)
134 } else if (!getInputIndex.equals(other.getInputIndex))
136 if (indexValue == null) {
137 if (other.indexValue != null)
139 } else if (!indexValue.equals(other.indexValue))
141 if (inputName == null) {
142 if (other.inputName != null)
144 } else if (!inputName.equals(other.inputName))
146 if (isList != other.isList)
148 if (propName == null) {
149 if (other.propName != null)
151 } else if (!propName.equals(other.propName))