2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2018 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=========================================================
20 package org.onap.policy.rest.jpa;
22 import java.io.Serializable;
23 import java.util.Date;
25 import javax.persistence.Column;
26 import javax.persistence.Entity;
27 import javax.persistence.GeneratedValue;
28 import javax.persistence.GenerationType;
29 import javax.persistence.Id;
30 import javax.persistence.NamedQuery;
31 import javax.persistence.Table;
32 import javax.persistence.Temporal;
33 import javax.persistence.TemporalType;
36 * The persistent class for the system log database table.
40 @Table(name="SystemLogDB")
41 @NamedQuery(name="SystemLogDB.findAll", query="SELECT o FROM SystemLogDB o")
42 public class SystemLogDB implements Serializable {
43 private static final long serialVersionUID = 1L;
47 @GeneratedValue(strategy = GenerationType.AUTO)
51 @Column(name="type", nullable=false)
54 @Column(name="system", nullable=false, length=255)
55 private String system;
57 @Column(name="description", nullable=true, length=2048)
58 private String description;
60 @Column(name="remote", nullable=false, length=255)
61 private String remote;
63 @Column(name="logtype", nullable=false, length=255)
64 private String logtype;
66 @Temporal(TemporalType.TIMESTAMP)
67 @Column(name="date", nullable=false, updatable=false)
70 public SystemLogDB() {
74 public SystemLogDB(int id, String system, String description, String remote,
75 String type, String logtype) {
78 this.description = description;
81 this.logtype = logtype;
88 public void setId(int id) {
92 public Date getDate(){
96 public void setDate(Date date){
100 public String getDescription() {
101 return this.description;
104 public void setDescription(String description) {
105 this.description = description;
108 public String getType() {
112 public void setType(String type) {
117 public String getSystem() {
121 public void setSystem(String system) {
122 this.system = system;
125 public String getRemote() {
129 public void setRemote(String remote) {
130 this.remote = remote;
133 public String getLogtype() {
137 public void setLogtype(String logtype) {
138 this.logtype = logtype;