2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2019 Nordix Foundation.
4 * ================================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.models.tosca.simple.concepts;
24 import java.util.TreeMap;
26 import javax.persistence.Entity;
27 import javax.persistence.Inheritance;
28 import javax.persistence.InheritanceType;
29 import javax.persistence.Table;
32 import lombok.EqualsAndHashCode;
34 import org.onap.policy.models.base.PfConceptContainer;
35 import org.onap.policy.models.base.PfConceptKey;
38 * This class is a container for TOSCA policy types.
40 * @author Liam Fallon (liam.fallon@est.tech)
43 @Table(name = "ToscaPolicyTypes")
44 @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
46 @EqualsAndHashCode(callSuper = true)
47 public class ToscaPolicyTypes extends PfConceptContainer<ToscaPolicyType> {
48 private static final long serialVersionUID = -4157979965271220098L;
51 * The Default Constructor creates a {@link ToscaPolicyTypes} object with a null artifact key
52 * and creates an empty concept map.
54 public ToscaPolicyTypes() {
55 super(new PfConceptKey());
59 * The Key Constructor creates a {@link ToscaPolicyTypes} object with the given artifact key and
60 * creates an empty concept map.
62 * @param key the concept key
64 public ToscaPolicyTypes(final PfConceptKey key) {
65 super(key, new TreeMap<PfConceptKey, ToscaPolicyType>());
69 * This Constructor creates an concept container with all of its fields defined.
71 * @param key the concept container key
72 * @param conceptMap the concepts to be stored in the concept container
74 public ToscaPolicyTypes(final PfConceptKey key, final Map<PfConceptKey, ToscaPolicyType> conceptMap) {
75 super(key, conceptMap);
81 * @param copyConcept the concept to copy from
83 public ToscaPolicyTypes(final ToscaPolicyTypes copyConcept) {