2ebbadcdafe7e5bb6b083c6d2fd57aefedc337ad
[sdc.git] /
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.components;
22
23 import java.io.Serializable;
24
25 public class ServiceMetadataDataDefinition extends ComponentMetadataDataDefinition implements Serializable {
26
27         /**
28          * 
29          */
30         private static final long serialVersionUID = -7661001892509435120L;
31
32         private String distributionStatus;
33
34         public ServiceMetadataDataDefinition() {
35                 super();
36         }
37
38         public ServiceMetadataDataDefinition(ServiceMetadataDataDefinition other) {
39                 super(other);
40         }
41
42         public String getDistributionStatus() {
43                 return distributionStatus;
44         }
45
46         public void setDistributionStatus(String distributionStatus) {
47                 this.distributionStatus = distributionStatus;
48         }
49
50         @Override
51         public String toString() {
52                 return "ServiceMetadataDataDefinition [ distributionStatus=" + distributionStatus + ", parent="
53                                 + super.toString() + "]";
54         }
55
56         @Override
57         public int hashCode() {
58                 final int prime = 31;
59                 int result = super.hashCode();
60                 result = prime * result + ((distributionStatus == null) ? 0 : distributionStatus.hashCode());
61                 return result;
62         }
63
64         @Override
65         public boolean equals(Object obj) {
66                 if (this == obj)
67                         return true;
68                 if (obj == null)
69                         return false;
70                 if (!(obj instanceof ComponentMetadataDataDefinition)) {
71                         return false;
72                 }
73                 if (!super.equals(obj)) {
74                         return false;
75                 }
76                 if (getClass() != obj.getClass())
77                         return false;
78                 ServiceMetadataDataDefinition other = (ServiceMetadataDataDefinition) obj;
79                 if (distributionStatus == null) {
80                         if (other.distributionStatus != null)
81                                 return false;
82                 } else if (!distributionStatus.equals(other.distributionStatus))
83                         return false;
84                 return super.equals(obj);
85         }
86
87 }