Unit/SONAR/Checkstyle in ONAP-REST
[policy/engine.git] / ONAP-REST / src / main / java / org / onap / policy / rest / jpa / SystemLogDb.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP-REST
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
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  *
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  */
21
22 package org.onap.policy.rest.jpa;
23
24 import java.io.Serializable;
25 import java.util.Date;
26
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;
36
37 import lombok.Getter;
38 import lombok.Setter;
39
40 /**
41  * The persistent class for the system log database table.
42  */
43 @Entity
44 @Table(name = "SystemLogDb")
45 @NamedQuery(name = "SystemLogDb.findAll", query = "SELECT o FROM SystemLogDb o")
46 @Getter
47 @Setter
48 public class SystemLogDb implements Serializable {
49     private static final long serialVersionUID = 1L;
50
51     @Id
52     @GeneratedValue(strategy = GenerationType.AUTO)
53     @Column(name = "id")
54     private int id;
55
56     @Column(name = "type", nullable = false)
57     private String type;
58
59     @Column(name = "system", nullable = false, length = 255)
60     private String system;
61
62     @Column(name = "description", nullable = true, length = 2048)
63     private String description;
64
65     @Column(name = "remote", nullable = false, length = 255)
66     private String remote;
67
68     @Column(name = "logtype", nullable = false, length = 255)
69     private String logtype;
70
71     @Temporal(TemporalType.TIMESTAMP)
72     @Column(name = "date", nullable = false, updatable = false)
73     private Date date;
74
75     /**
76      * Instantiates a new system log db.
77      */
78     public SystemLogDb() {
79         super();
80     }
81
82     /**
83      * Instantiates a new system log db.
84      *
85      * @param id the id
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
91      */
92     public SystemLogDb(int id, String system, String description, String remote, String type, String logtype) {
93         this.id = id;
94         this.system = system;
95         this.description = description;
96         this.remote = remote;
97         this.type = type;
98         this.logtype = logtype;
99     }
100 }