[SDC] Onboarding 1710 rebase.
[sdc.git] / openecomp-be / lib / openecomp-sdc-vendor-software-product-lib / openecomp-sdc-vendor-software-product-api / src / main / java / org / openecomp / sdc / vendorsoftwareproduct / types / composition / ComponentData.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.vendorsoftwareproduct.types.composition;
22
23 public class ComponentData implements CompositionDataEntity {
24   private String name;
25   private String description;
26   private String displayName;
27   private String vfcCode;
28   private String nfcCode;
29   private String nfcFunction;
30
31   public String getName() {
32     return name;
33   }
34
35   public void setName(String name) {
36     this.name = name;
37   }
38
39   public String getDescription() {
40     return description;
41   }
42
43   public void setDescription(String description) {
44     this.description = description;
45   }
46
47   public String getDisplayName() {
48     return displayName;
49   }
50
51   public void setDisplayName(String displayName) {
52     this.displayName = displayName;
53   }
54
55   public String getNfcCode() {
56     return nfcCode;
57   }
58
59   public void setNfcCode(String nfcCode) {
60     this.nfcCode = nfcCode;
61   }
62
63   public String getNfcFunction() {
64     return nfcFunction;
65   }
66
67   public void setNfcFunction(String nfcFunction) {
68     this.nfcFunction = nfcFunction;
69   }
70
71   @Override
72   public int hashCode() {
73     int result = name.hashCode();
74     result = 31 * result + (description != null ? description.hashCode() : 0);
75     result = 31 * result + (displayName != null ? displayName.hashCode() : 0);
76     return result;
77   }
78
79   @Override
80   public boolean equals(Object object) {
81     if (this == object) {
82       return true;
83     }
84     if (!(object instanceof ComponentData)) {
85       return false;
86     }
87
88     ComponentData that = (ComponentData) object;
89
90     if (!name.equals(that.name)) {
91       return false;
92     }
93     if (description != null ? !description.equals(that.description) : that.description != null) {
94       return false;
95     }
96     return displayName != null ? displayName.equals(that.displayName) : that.displayName == null;
97
98   }
99
100   public String getVfcCode() {
101     return vfcCode;
102   }
103
104   public void setVfcCode(String vfcCode) {
105     this.vfcCode = vfcCode;
106   }
107 }