re base code
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / elements / GetInputValueDataDefinition.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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.sdc.be.datatypes.elements;
22
23 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
24
25 import java.util.Map;
26
27 public class GetInputValueDataDefinition  extends ToscaDataDefinition {
28
29         private String propName;
30         private String inputName;
31         private String inputId;
32         private Integer indexValue;
33         private GetInputValueDataDefinition getInputIndex;
34
35         private boolean isList = false;
36         
37         public GetInputValueDataDefinition(){
38                 super();
39         }
40
41         public GetInputValueDataDefinition(Map<String, Object> pr) {
42                 super(pr);
43         }
44
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());
52                 
53                 
54         }
55
56         public String getPropName() {
57                 return propName;
58         }
59
60         public void setPropName(String propName) {
61                 this.propName = propName;
62         }
63
64         public String getInputName() {
65                 return inputName;
66         }
67
68         public void setInputName(String inputName) {
69                 this.inputName = inputName;
70         }
71
72         public Integer getIndexValue() {
73                 return indexValue;
74         }
75
76         public void setIndexValue(Integer indexValue) {
77                 this.indexValue = indexValue;
78         }
79
80         public GetInputValueDataDefinition getGetInputIndex() {
81                 return getInputIndex;
82         }
83
84         public void setGetInputIndex(GetInputValueDataDefinition getInputIndex) {
85                 this.getInputIndex = getInputIndex;
86         }
87
88         public boolean isList() {
89                 return isList;
90         }
91
92         public void setList(boolean isList) {
93                 this.isList = isList;
94         }
95         
96         
97         public String getInputId() {
98                 return inputId;
99         }
100
101         public void setInputId(String inputId) {
102                 this.inputId = inputId;
103         }
104
105         @Override
106         public String toString() {
107                 return "GetInputValueDataDefinition [propName=" + propName + ", inputName=" + inputName + ", indexValue=" + indexValue + ", getInputIndex=" + getInputIndex + ", isList=" + isList + "]";
108         }
109
110         @Override
111         public int hashCode() {
112                 final int prime = 31;
113                 int result = 1;
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());
119                 return result;
120         }
121
122         @Override
123         public boolean equals(Object obj) {
124                 if (this == obj)
125                         return true;
126                 if (obj == null)
127                         return false;
128                 if (getClass() != obj.getClass())
129                         return false;
130                 GetInputValueDataDefinition other = (GetInputValueDataDefinition) obj;
131                 if (getInputIndex == null) {
132                         if (other.getInputIndex != null)
133                                 return false;
134                 } else if (!getInputIndex.equals(other.getInputIndex))
135                         return false;
136                 if (indexValue == null) {
137                         if (other.indexValue != null)
138                                 return false;
139                 } else if (!indexValue.equals(other.indexValue))
140                         return false;
141                 if (inputName == null) {
142                         if (other.inputName != null)
143                                 return false;
144                 } else if (!inputName.equals(other.inputName))
145                         return false;
146                 if (isList != other.isList)
147                         return false;
148                 if (propName == null) {
149                         if (other.propName != null)
150                                 return false;
151                 } else if (!propName.equals(other.propName))
152                         return false;
153                 return true;
154         }
155         
156         
157
158 }