Initial OpenECOMP SDC commit
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / category / CategoryDataDefinition.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.category;
22
23 import java.io.Serializable;
24 import java.util.List;
25
26 public class CategoryDataDefinition implements Serializable {
27
28         /**
29          * 
30          */
31         private static final long serialVersionUID = 2882352060242714427L;
32
33         private String name;
34         private String normalizedName;
35         private String uniqueId;
36         private List<String> icons;
37
38         public CategoryDataDefinition() {
39
40         }
41
42         public CategoryDataDefinition(CategoryDataDefinition c) {
43                 this.name = c.name;
44                 this.normalizedName = c.normalizedName;
45                 this.uniqueId = c.uniqueId;
46                 this.icons = c.icons;
47         }
48
49         public String getName() {
50                 return name;
51         }
52
53         public void setName(String name) {
54                 this.name = name;
55         }
56
57         public String getNormalizedName() {
58                 return normalizedName;
59         }
60
61         public void setNormalizedName(String normalizedName) {
62                 this.normalizedName = normalizedName;
63         }
64
65         public String getUniqueId() {
66                 return uniqueId;
67         }
68
69         public void setUniqueId(String uniqueId) {
70                 this.uniqueId = uniqueId;
71         }
72
73         public List<String> getIcons() {
74                 return icons;
75         }
76
77         public void setIcons(List<String> icons) {
78                 this.icons = icons;
79         }
80
81         @Override
82         public int hashCode() {
83                 final int prime = 31;
84                 int result = 1;
85                 result = prime * result + ((name == null) ? 0 : name.hashCode());
86                 result = prime * result + ((normalizedName == null) ? 0 : normalizedName.hashCode());
87                 result = prime * result + ((uniqueId == null) ? 0 : uniqueId.hashCode());
88                 result = prime * result + ((icons == null) ? 0 : icons.hashCode());
89                 return result;
90         }
91
92         @Override
93         public boolean equals(Object obj) {
94                 if (this == obj)
95                         return true;
96                 if (obj == null)
97                         return false;
98                 if (getClass() != obj.getClass())
99                         return false;
100                 CategoryDataDefinition other = (CategoryDataDefinition) obj;
101                 if (name == null) {
102                         if (other.name != null)
103                                 return false;
104                 } else if (!name.equals(other.name))
105                         return false;
106                 if (normalizedName == null) {
107                         if (other.normalizedName != null)
108                                 return false;
109                 } else if (!normalizedName.equals(other.normalizedName))
110                         return false;
111                 if (uniqueId == null) {
112                         if (other.uniqueId != null)
113                                 return false;
114                 } else if (!uniqueId.equals(other.uniqueId))
115                         return false;
116                 if (icons == null) {
117                         if (other.icons != null)
118                                 return false;
119                 } else if (!icons.equals(other.icons))
120                         return false;
121                 return true;
122         }
123
124         @Override
125         public String toString() {
126                 return "CategoryDataDefinition [name=" + name + ", normalizedName=" + normalizedName + ", uniqueId=" + uniqueId
127                                 + ", icons=" + icons + "]";
128         }
129
130 }