Reformat catalog-model
[sdc.git] / catalog-model / src / main / java / org / openecomp / sdc / be / model / AdditionalInformationDefinition.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 package org.openecomp.sdc.be.model;
21
22 import java.util.List;
23 import org.openecomp.sdc.be.datatypes.elements.AdditionalInfoParameterDataDefinition;
24 import org.openecomp.sdc.be.datatypes.elements.AdditionalInfoParameterInfo;
25
26 public class AdditionalInformationDefinition extends AdditionalInfoParameterDataDefinition {
27
28     private String parentUniqueId;
29
30     public AdditionalInformationDefinition() {
31         super();
32     }
33
34     public AdditionalInformationDefinition(AdditionalInfoParameterDataDefinition p, String parentUniqueId,
35                                            List<AdditionalInfoParameterInfo> parameters) {
36         super(p);
37         this.parentUniqueId = parentUniqueId;
38         setParameters(parameters);
39     }
40
41     public AdditionalInformationDefinition(AdditionalInfoParameterDataDefinition p) {
42         this.setUniqueId(p.getUniqueId());
43         this.setCreationTime(p.getCreationTime());
44         this.setModificationTime(p.getModificationTime());
45         setParameters(p.getParameters());
46     }
47
48     public AdditionalInformationDefinition(AdditionalInformationDefinition pd) {
49         this.setUniqueId(pd.getUniqueId());
50         this.setCreationTime(pd.getCreationTime());
51         this.setModificationTime(pd.getModificationTime());
52         this.parentUniqueId = pd.parentUniqueId;
53     }
54
55     public String getParentUniqueId() {
56         return parentUniqueId;
57     }
58
59     public void setParentUniqueId(String parentUniqueId) {
60         this.parentUniqueId = parentUniqueId;
61     }
62
63     @Override
64     public String toString() {
65         return "AdditionalInformationDefinition [ parentUniqueId=" + parentUniqueId + " " + super.toString() + "]";
66     }
67 }