Initial OpenECOMP policy/engine commit
[policy/engine.git] / ECOMP-REST / src / main / java / org / openecomp / policy / rest / jpa / SystemLogDB.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ECOMP-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.openecomp.policy.rest.jpa;
32
33 import java.io.Serializable;
34 import java.util.Date;
35 import java.util.HashSet;
36 import java.util.Set;
37
38 import javax.persistence.CascadeType;
39 import javax.persistence.Column;
40 import javax.persistence.Entity;
41 import javax.persistence.GeneratedValue;
42 import javax.persistence.GenerationType;
43 import javax.persistence.Id;
44 import javax.persistence.NamedQuery;
45 import javax.persistence.OneToMany;
46 import javax.persistence.PrePersist;
47 import javax.persistence.PreUpdate;
48 import javax.persistence.Table;
49 import javax.persistence.Temporal;
50 import javax.persistence.TemporalType;
51 import javax.persistence.Transient;
52
53 import com.att.research.xacml.api.Identifier;
54
55 /**
56   * The persistent class for the system log database table.
57   * 
58 */
59 @Entity
60 @Table(name="SystemLogDB")
61 @NamedQuery(name="SystemLogDB.findAll", query="SELECT o FROM SystemLogDB o")
62 public class SystemLogDB implements Serializable {
63         private static final long serialVersionUID = 1L;
64
65
66         @Id
67         @GeneratedValue(strategy = GenerationType.AUTO)
68         @Column(name="id")
69         private int id;
70
71         @Column(name="type", nullable=false)
72         private String type;
73
74         @Column(name="system", nullable=false, length=255)
75         private String system;
76
77         @Column(name="description", nullable=true, length=2048)
78         private String description;
79         
80         @Column(name="remote", nullable=false, length=255)
81         private String remote;
82         
83         @Column(name="logtype", nullable=false, length=255)
84         private String logtype;
85
86         @Temporal(TemporalType.TIMESTAMP)
87         @Column(name="date", nullable=false, updatable=false)
88         private Date date;
89
90         public SystemLogDB() {
91                 super();
92         }
93         
94         public SystemLogDB(int id, String system, String description, String remote,
95                         String type, String logtype) {
96                 // TODO Auto-generated constructor stub
97                 this.id = id;
98                 this.system = system;
99                 this.description = description;
100                 this.remote = remote;
101                 this.type = type;
102                 this.logtype = logtype;
103         }
104
105         public void SystemLogB (int id, String system, String description, String remote, String type, Date date, String logtype){
106                 this.id = id;
107                 this.system = system;
108                 this.description = description;
109                 this.remote = remote;
110                 this.type = type;
111                 this.date = date;
112                 this.logtype = logtype;
113                 
114         }
115         
116         public int getId() {
117                 return this.id;
118         }
119
120         public void setId(int id) {
121                 this.id = id;
122         }
123         
124         public Date getDate(){
125                 return this.date;
126         }
127         
128         public void setDate(Date date){
129                 this.date = date;
130         }
131
132         public String getDescription() {
133                 return this.description;
134         }
135
136         public void setDescription(String description) {
137                 this.description = description;
138         }
139
140         public String getType() {
141                 return this.type;
142         }
143
144         public void setType(String type) {
145                 this.type = type;
146                 
147         }
148
149         public String getSystem() {
150                 return this.system;
151         }
152
153         public void setSystem(String system) {
154                 this.system = system;
155         }
156         
157         public String getRemote() {
158                 return this.remote;
159         }
160
161         public void setRemote(String remote) {
162                 this.remote = remote;
163                 
164         }
165         public String getLogtype() {
166                 return this.logtype;
167         }
168
169         public void setLogtype(String logtype) {
170                 this.logtype = logtype;
171                 
172         }
173 }