45e20d63265f1231295f3e26d39730ca6c0a2286
[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  * ================================================================================
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20 package org.onap.policy.rest.jpa;
21
22 import java.io.Serializable;
23 import java.util.Date;
24
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;
34
35 /**
36   * The persistent class for the system log database table.
37   * 
38 */
39 @Entity
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;
44
45
46         @Id
47         @GeneratedValue(strategy = GenerationType.AUTO)
48         @Column(name="id")
49         private int id;
50
51         @Column(name="type", nullable=false)
52         private String type;
53
54         @Column(name="system", nullable=false, length=255)
55         private String system;
56
57         @Column(name="description", nullable=true, length=2048)
58         private String description;
59         
60         @Column(name="remote", nullable=false, length=255)
61         private String remote;
62         
63         @Column(name="logtype", nullable=false, length=255)
64         private String logtype;
65
66         @Temporal(TemporalType.TIMESTAMP)
67         @Column(name="date", nullable=false, updatable=false)
68         private Date date;
69
70         public SystemLogDB() {
71                 super();
72         }
73         
74         public SystemLogDB(int id, String system, String description, String remote,
75                         String type, String logtype) {
76                 this.id = id;
77                 this.system = system;
78                 this.description = description;
79                 this.remote = remote;
80                 this.type = type;
81                 this.logtype = logtype;
82         }
83         
84         public int getId() {
85                 return this.id;
86         }
87
88         public void setId(int id) {
89                 this.id = id;
90         }
91         
92         public Date getDate(){
93                 return this.date;
94         }
95         
96         public void setDate(Date date){
97                 this.date = date;
98         }
99
100         public String getDescription() {
101                 return this.description;
102         }
103
104         public void setDescription(String description) {
105                 this.description = description;
106         }
107
108         public String getType() {
109                 return this.type;
110         }
111
112         public void setType(String type) {
113                 this.type = type;
114                 
115         }
116
117         public String getSystem() {
118                 return this.system;
119         }
120
121         public void setSystem(String system) {
122                 this.system = system;
123         }
124         
125         public String getRemote() {
126                 return this.remote;
127         }
128
129         public void setRemote(String remote) {
130                 this.remote = remote;
131                 
132         }
133         public String getLogtype() {
134                 return this.logtype;
135         }
136
137         public void setLogtype(String logtype) {
138                 this.logtype = logtype;
139                 
140         }
141 }