Added oparent to sdc main
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / main / java / org / openecomp / sdc / translator / datatypes / heattotosca / unifiedmodel / consolidation / GetAttrFuncData.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2019 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.translator.datatypes.heattotosca.unifiedmodel.consolidation;
22
23 /**
24  * The type get attribute data.
25  */
26 public class GetAttrFuncData {
27
28   private String fieldName;
29   private String attributeName;
30
31   public GetAttrFuncData(){}
32
33   public GetAttrFuncData(String fieldName, String attributeName) {
34     this.fieldName = fieldName;
35     this.attributeName = attributeName;
36   }
37
38   public String getFieldName() {
39     return fieldName;
40   }
41
42   public void setFieldName(String fieldName) {
43     this.fieldName = fieldName;
44   }
45
46   public String getAttributeName() {
47     return attributeName;
48   }
49
50   public void setAttributeName(String attributeName) {
51     this.attributeName = attributeName;
52   }
53
54   @Override
55   public boolean equals(Object o) {
56     if (this == o) {
57       return true;
58     }
59     if (o == null || getClass() != o.getClass()) {
60       return false;
61     }
62
63     GetAttrFuncData that = (GetAttrFuncData) o;
64
65     if (fieldName != null ? !fieldName.equals(that.fieldName) : that.fieldName != null) {
66       return false;
67     }
68     if (attributeName != null ? !attributeName.equals(that.attributeName)
69         : that.attributeName != null) {
70       return false;
71     }
72
73     return true;
74   }
75
76   @Override
77   public int hashCode() {
78     int result = fieldName != null ? fieldName.hashCode() : 0;
79     result = 31 * result + (attributeName != null ? attributeName.hashCode() : 0);
80     return result;
81   }
82 }