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