re base code
[sdc.git] / catalog-model / src / main / java / org / openecomp / sdc / be / model / ComponentMetadataDefinition.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.model;
22
23 import org.openecomp.sdc.be.datatypes.components.ComponentMetadataDataDefinition;
24
25 public class ComponentMetadataDefinition {
26
27     protected ComponentMetadataDataDefinition componentMetadataDataDefinition;
28
29     public ComponentMetadataDefinition() {
30
31     }
32
33     public ComponentMetadataDefinition(ComponentMetadataDataDefinition component) {
34         this.componentMetadataDataDefinition = component;
35     }
36
37     public ComponentMetadataDataDefinition getMetadataDataDefinition() {
38         return this.componentMetadataDataDefinition;
39     }
40
41     @Override
42     public int hashCode() {
43         final int prime = 31;
44         int result = 1;
45         result = prime * result
46                 + ((componentMetadataDataDefinition == null) ? 0 : componentMetadataDataDefinition.hashCode());
47         return result;
48     }
49
50     @Override
51     public boolean equals(Object obj) {
52         if (this == obj)
53             return true;
54         if (obj == null)
55             return false;
56         if (getClass() != obj.getClass())
57             return false;
58         ComponentMetadataDefinition other = (ComponentMetadataDefinition) obj;
59         if (componentMetadataDataDefinition == null) {
60             if (other.componentMetadataDataDefinition != null)
61                 return false;
62         } else if (!componentMetadataDataDefinition.equals(other.componentMetadataDataDefinition))
63             return false;
64         return true;
65     }
66
67 }