Merge automation from ECOMP's repository
[vid.git] / vid-automation / src / main / java / org / onap / sdc / ci / tests / devObjects / 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.onap.sdc.ci.tests.devObjects;
22
23 import java.io.Serializable;
24
25 public class GroupingDataDefinition extends ToscaDataDefinition implements Serializable {
26         /**
27          * 
28          */
29         private static final long serialVersionUID = 2641475929148843849L;
30
31         private String name;
32         private String normalizedName;
33         private String uniqueId;
34
35         public GroupingDataDefinition() {
36
37         }
38
39         public GroupingDataDefinition(GroupingDataDefinition c) {
40                 this.name = c.name;
41                 this.normalizedName = c.normalizedName;
42                 this.uniqueId = c.uniqueId;
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         @Override
70         public int hashCode() {
71                 final int prime = 31;
72                 int result = 1;
73                 result = prime * result + ((name == null) ? 0 : name.hashCode());
74                 result = prime * result + ((normalizedName == null) ? 0 : normalizedName.hashCode());
75                 result = prime * result + ((uniqueId == null) ? 0 : uniqueId.hashCode());
76                 return result;
77         }
78
79         @Override
80         public boolean equals(Object obj) {
81                 if (this == obj)
82                         return true;
83                 if (obj == null)
84                         return false;
85                 if (getClass() != obj.getClass())
86                         return false;
87                 GroupingDataDefinition other = (GroupingDataDefinition) obj;
88                 if (name == null) {
89                         if (other.name != null)
90                                 return false;
91                 } else if (!name.equals(other.name))
92                         return false;
93                 if (normalizedName == null) {
94                         if (other.normalizedName != null)
95                                 return false;
96                 } else if (!normalizedName.equals(other.normalizedName))
97                         return false;
98                 if (uniqueId == null) {
99                         if (other.uniqueId != null)
100                                 return false;
101                 } else if (!uniqueId.equals(other.uniqueId))
102                         return false;
103                 return true;
104         }
105
106         @Override
107         public String toString() {
108                 return "GroupingDataDefinition [name=" + name + ", normalizedName=" + normalizedName + ", uniqueId=" + uniqueId
109                                 + "]";
110         }
111
112 }