2 * ============LICENSE_START=======================================================
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
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=========================================================
23 * THIS FILE CONTAINS PROPRIETARY INFORMATION OF
24 * AT&T AND IS NOT TO BE DISCLOSED OR USED EXCEPT IN
25 * ACCORDANCE WITH APPLICABLE AGREEMENTS.
27 * Copyright (c) 2013 AT&T Knowledge Ventures
28 * Unpublished and Not for Publication
31 package org.openecomp.policy.rest.jpa;
33 import java.io.Serializable;
34 import java.util.Date;
35 import java.util.HashSet;
38 import javax.persistence.CascadeType;
39 import javax.persistence.Column;
40 import javax.persistence.Entity;
41 import javax.persistence.GeneratedValue;
42 import javax.persistence.GenerationType;
43 import javax.persistence.Id;
44 import javax.persistence.NamedQuery;
45 import javax.persistence.OneToMany;
46 import javax.persistence.PrePersist;
47 import javax.persistence.PreUpdate;
48 import javax.persistence.Table;
49 import javax.persistence.Temporal;
50 import javax.persistence.TemporalType;
51 import javax.persistence.Transient;
53 import com.att.research.xacml.api.Identifier;
56 * The persistent class for the system log database table.
60 @Table(name="SystemLogDB")
61 @NamedQuery(name="SystemLogDB.findAll", query="SELECT o FROM SystemLogDB o")
62 public class SystemLogDB implements Serializable {
63 private static final long serialVersionUID = 1L;
67 @GeneratedValue(strategy = GenerationType.AUTO)
71 @Column(name="type", nullable=false)
74 @Column(name="system", nullable=false, length=255)
75 private String system;
77 @Column(name="description", nullable=true, length=2048)
78 private String description;
80 @Column(name="remote", nullable=false, length=255)
81 private String remote;
83 @Column(name="logtype", nullable=false, length=255)
84 private String logtype;
86 @Temporal(TemporalType.TIMESTAMP)
87 @Column(name="date", nullable=false, updatable=false)
90 public SystemLogDB() {
94 public SystemLogDB(int id, String system, String description, String remote,
95 String type, String logtype) {
96 // TODO Auto-generated constructor stub
99 this.description = description;
100 this.remote = remote;
102 this.logtype = logtype;
105 public void SystemLogB (int id, String system, String description, String remote, String type, Date date, String logtype){
107 this.system = system;
108 this.description = description;
109 this.remote = remote;
112 this.logtype = logtype;
120 public void setId(int id) {
124 public Date getDate(){
128 public void setDate(Date date){
132 public String getDescription() {
133 return this.description;
136 public void setDescription(String description) {
137 this.description = description;
140 public String getType() {
144 public void setType(String type) {
149 public String getSystem() {
153 public void setSystem(String system) {
154 this.system = system;
157 public String getRemote() {
161 public void setRemote(String remote) {
162 this.remote = remote;
165 public String getLogtype() {
169 public void setLogtype(String logtype) {
170 this.logtype = logtype;