Merge "Make clientAuth header optional and log request"
[policy/engine.git] / ONAP-REST / src / main / java / org / onap / policy / rest / jpa / PolicyAuditlog.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP-PAP-REST
4  * ================================================================================
5  * Copyright (C) 2019 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 package org.onap.policy.rest.jpa;
22
23 import java.util.Date;
24 import javax.persistence.Column;
25 import javax.persistence.Entity;
26 import javax.persistence.GeneratedValue;
27 import javax.persistence.GenerationType;
28 import javax.persistence.Id;
29 import javax.persistence.NamedQuery;
30 import javax.persistence.Table;
31
32 @Entity
33 @Table(name = "policyAuditlog")
34 @NamedQuery(name = "policyAuditlog.findAll", query = "SELECT v FROM PolicyAuditlog v ")
35 public class PolicyAuditlog {
36     private static final long serialVersionUID = 1L;
37     @Id
38     @GeneratedValue(strategy = GenerationType.AUTO)
39     @Column(name = "id", nullable = false, unique = true)
40     private int id;
41
42     @Column(name = "userName", nullable = false, length = 100)
43     private String userName;
44
45     @Column(name = "policyName", nullable = false, length = 255)
46     private String policyName;
47
48     @Column(name = "actions", nullable = false, length = 50)
49     private String actions;
50
51     @Column(name = "dateAndTime", nullable = false)
52     private Date dateAndTime;
53
54     public int getId() {
55         return id;
56     }
57
58     public void setId(int id) {
59         this.id = id;
60     }
61
62     public String getUserName() {
63         return userName;
64     }
65
66     public void setUserName(String userName) {
67         this.userName = userName;
68     }
69
70     public String getPolicyName() {
71         return policyName;
72     }
73
74     public void setPolicyName(String policyName) {
75         this.policyName = policyName;
76     }
77
78     public String getActions() {
79         return actions;
80     }
81
82     public void setActions(String actions) {
83         this.actions = actions;
84     }
85
86     public Date getDateAndTime() {
87         return dateAndTime;
88     }
89
90     public void setDateAndTime(Date dateAndTime) {
91         this.dateAndTime = dateAndTime;
92     }
93 }