2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
6 * Modifications Copyright (C) 2019 Nordix Foundation.
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=========================================================
22 package org.onap.policy.rest.jpa;
24 import java.io.Serializable;
25 import java.util.Date;
27 import javax.persistence.Column;
28 import javax.persistence.Entity;
29 import javax.persistence.GeneratedValue;
30 import javax.persistence.GenerationType;
31 import javax.persistence.Id;
32 import javax.persistence.NamedQuery;
33 import javax.persistence.Table;
34 import javax.persistence.Temporal;
35 import javax.persistence.TemporalType;
41 * The persistent class for the system log database table.
44 @Table(name = "SystemLogDb")
45 @NamedQuery(name = "SystemLogDb.findAll", query = "SELECT o FROM SystemLogDb o")
48 public class SystemLogDb implements Serializable {
49 private static final long serialVersionUID = 1L;
52 @GeneratedValue(strategy = GenerationType.AUTO)
56 @Column(name = "type", nullable = false)
59 @Column(name = "system", nullable = false, length = 255)
60 private String system;
62 @Column(name = "description", nullable = true, length = 2048)
63 private String description;
65 @Column(name = "remote", nullable = false, length = 255)
66 private String remote;
68 @Column(name = "logtype", nullable = false, length = 255)
69 private String logtype;
71 @Temporal(TemporalType.TIMESTAMP)
72 @Column(name = "date", nullable = false, updatable = false)
76 * Instantiates a new system log db.
78 public SystemLogDb() {
83 * Instantiates a new system log db.
86 * @param system the system
87 * @param description the description
88 * @param remote the remote
89 * @param type the type
90 * @param logtype the logtype
92 public SystemLogDb(int id, String system, String description, String remote, String type, String logtype) {
95 this.description = description;
98 this.logtype = logtype;