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