2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 - 2019 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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.vid.model;
23 import com.fasterxml.jackson.annotation.JsonIgnore;
24 import org.onap.portalsdk.core.domain.support.DomainVo;
26 import javax.persistence.*;
27 import java.io.Serializable;
28 import java.util.Date;
29 import java.util.HashSet;
33 @Table(name = "vid_vnf")
34 public class VNFDao extends DomainVo {
36 private String vnfUUID;
37 private String vnfInvariantUUID;
38 private Set<VidWorkflow> workflows = new HashSet<>(0);
41 @GeneratedValue(strategy = GenerationType.IDENTITY)
42 @Column(name = "VNF_DB_ID")
49 @Column(name = "CREATED_DATE")
51 public Date getCreated() {
52 return super.getCreated();
56 @Column(name = "MODIFIED_DATE")
58 public Date getModified() {
59 return super.getModified();
65 public Long getCreatedId() {
66 return super.getCreatedId();
72 public Long getModifiedId() {
73 return super.getModifiedId();
79 public Serializable getAuditUserId() {
80 return super.getAuditUserId();
86 public Long getRowNum() {
87 return super.getRowNum();
93 public Set getAuditTrail() {
94 return super.getAuditTrail();
97 @Column(name = "VNF_APP_UUID")
98 public String getVnfUUID() {
102 @Column(name = "VNF_APP_INVARIANT_UUID")
103 public String getVnfInvariantUUID() {
104 return vnfInvariantUUID;
108 public void setVnfUUID(String vnfUUID) {
109 this.vnfUUID = vnfUUID;
112 public void setVnfInvariantUUID(String vnfInvariantUUID) {
113 this.vnfInvariantUUID = vnfInvariantUUID;
116 @ManyToMany(cascade = CascadeType.ALL, fetch =FetchType.EAGER )
117 @JoinTable(name = "vid_vnf_workflow", joinColumns = { @JoinColumn(name = "VNF_DB_ID") }, inverseJoinColumns = { @JoinColumn(name = "WORKFLOW_DB_ID") })
118 public Set<VidWorkflow> getWorkflows() {
122 public void setWorkflows(Set<VidWorkflow> workflows) {
123 this.workflows = workflows;