2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2019 AT&T Intellectual Property. All rights
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END============================================
20 * ===================================================================
24 package org.onap.clamp.dao.model;
26 import com.google.gson.annotations.Expose;
27 import com.vladmihalcea.hibernate.type.json.JsonStringType;
29 import java.io.Serializable;
32 import javax.persistence.Column;
33 import javax.persistence.Entity;
34 import javax.persistence.FetchType;
35 import javax.persistence.Id;
36 import javax.persistence.JoinColumn;
37 import javax.persistence.ManyToOne;
38 import javax.persistence.Table;
40 import org.hibernate.annotations.Type;
41 import org.hibernate.annotations.TypeDef;
44 @Table(name = "operational_policies")
45 @TypeDef(name = "json", typeClass = JsonStringType.class)
46 public class OperationalPolicy implements Serializable {
50 private static final long serialVersionUID = 6117076450841538255L;
54 @Column(nullable = false, name = "name", unique = true)
59 @Column(columnDefinition = "json", name = "configurations_json")
60 private Map<String, Object> configurationsJson;
62 @ManyToOne(fetch = FetchType.LAZY)
63 @JoinColumn(name = "loop_id", nullable = false)
66 public Loop getLoop() {
70 public void setLoop(Loop loop) {
74 public String getName() {
78 public void setName(String name) {
82 public Map<String, Object> getConfigurationsJson() {
83 return configurationsJson;
86 public void setConfigurationsJson(Map<String, Object> configurationsJson) {
87 this.configurationsJson = configurationsJson;