0747c837fd52afc34fa5ee27dc5959152c337b9e
[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 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
21 /*
22  *                        AT&T - PROPRIETARY
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.
26  *
27  *          Copyright (c) 2013 AT&T Knowledge Ventures
28  *              Unpublished and Not for Publication
29  *                     All Rights Reserved
30  */
31 package org.onap.policy.rest.jpa;
32
33 import java.io.Serializable;
34 import java.util.Date;
35
36 import javax.persistence.Column;
37 import javax.persistence.Entity;
38 import javax.persistence.GeneratedValue;
39 import javax.persistence.GenerationType;
40 import javax.persistence.Id;
41 import javax.persistence.NamedQuery;
42 import javax.persistence.Table;
43 import javax.persistence.Temporal;
44 import javax.persistence.TemporalType;
45
46 /**
47   * The persistent class for the system log database table.
48   * 
49 */
50 @Entity
51 @Table(name="SystemLogDB")
52 @NamedQuery(name="SystemLogDB.findAll", query="SELECT o FROM SystemLogDB o")
53 public class SystemLogDB implements Serializable {
54         private static final long serialVersionUID = 1L;
55
56
57         @Id
58         @GeneratedValue(strategy = GenerationType.AUTO)
59         @Column(name="id")
60         private int id;
61
62         @Column(name="type", nullable=false)
63         private String type;
64
65         @Column(name="system", nullable=false, length=255)
66         private String system;
67
68         @Column(name="description", nullable=true, length=2048)
69         private String description;
70         
71         @Column(name="remote", nullable=false, length=255)
72         private String remote;
73         
74         @Column(name="logtype", nullable=false, length=255)
75         private String logtype;
76
77         @Temporal(TemporalType.TIMESTAMP)
78         @Column(name="date", nullable=false, updatable=false)
79         private Date date;
80
81         public SystemLogDB() {
82                 super();
83         }
84         
85         public SystemLogDB(int id, String system, String description, String remote,
86                         String type, String logtype) {
87                 this.id = id;
88                 this.system = system;
89                 this.description = description;
90                 this.remote = remote;
91                 this.type = type;
92                 this.logtype = logtype;
93         }
94
95         public void SystemLogB (int id, String system, String description, String remote, String type, Date date, String logtype){
96                 this.id = id;
97                 this.system = system;
98                 this.description = description;
99                 this.remote = remote;
100                 this.type = type;
101                 this.date = date;
102                 this.logtype = logtype;
103                 
104         }
105         
106         public int getId() {
107                 return this.id;
108         }
109
110         public void setId(int id) {
111                 this.id = id;
112         }
113         
114         public Date getDate(){
115                 return this.date;
116         }
117         
118         public void setDate(Date date){
119                 this.date = date;
120         }
121
122         public String getDescription() {
123                 return this.description;
124         }
125
126         public void setDescription(String description) {
127                 this.description = description;
128         }
129
130         public String getType() {
131                 return this.type;
132         }
133
134         public void setType(String type) {
135                 this.type = type;
136                 
137         }
138
139         public String getSystem() {
140                 return this.system;
141         }
142
143         public void setSystem(String system) {
144                 this.system = system;
145         }
146         
147         public String getRemote() {
148                 return this.remote;
149         }
150
151         public void setRemote(String remote) {
152                 this.remote = remote;
153                 
154         }
155         public String getLogtype() {
156                 return this.logtype;
157         }
158
159         public void setLogtype(String logtype) {
160                 this.logtype = logtype;
161                 
162         }
163 }