root / trunk / src / java / org / lidar / db / Log.java
History | View | Annotate | Download (1.13 KB)
| 1 | 9 | andrej.cim | package org.lidar.db; |
|---|---|---|---|
| 2 | |||
| 3 | import java.io.Serializable; |
||
| 4 | import java.util.Date; |
||
| 5 | import javax.persistence.*; |
||
| 6 | |||
| 7 | /**
|
||
| 8 | *
|
||
| 9 | * @author Andrej Cimpersek
|
||
| 10 | */
|
||
| 11 | @Entity
|
||
| 12 | 12 | andrej.cim | @Table(name = "log") |
| 13 | 9 | andrej.cim | public class Log implements Serializable { |
| 14 | 12 | andrej.cim | |
| 15 | 9 | andrej.cim | private Integer id; |
| 16 | private Date date; |
||
| 17 | private String type; |
||
| 18 | private String message; |
||
| 19 | |||
| 20 | 12 | andrej.cim | public Log() {
|
| 21 | 9 | andrej.cim | } |
| 22 | |||
| 23 | 12 | andrej.cim | public Log(Integer id, Date date, String type, String message) { |
| 24 | 9 | andrej.cim | this.id = id;
|
| 25 | this.date = date;
|
||
| 26 | this.type = type;
|
||
| 27 | this.message = message;
|
||
| 28 | } |
||
| 29 | |||
| 30 | @Id
|
||
| 31 | public Integer getId() { |
||
| 32 | return this.id; |
||
| 33 | } |
||
| 34 | |||
| 35 | public void setId(Integer id) { |
||
| 36 | this.id = id;
|
||
| 37 | } |
||
| 38 | |||
| 39 | @Temporal(javax.persistence.TemporalType.DATE)
|
||
| 40 | 12 | andrej.cim | @Column(name = "access") |
| 41 | 9 | andrej.cim | public Date getDate() { |
| 42 | return this.date; |
||
| 43 | } |
||
| 44 | |||
| 45 | public void setDate(Date date) { |
||
| 46 | this.date = date;
|
||
| 47 | } |
||
| 48 | |||
| 49 | public String getType() { |
||
| 50 | return this.type; |
||
| 51 | } |
||
| 52 | |||
| 53 | public void setType(String type) { |
||
| 54 | this.type = type;
|
||
| 55 | } |
||
| 56 | |||
| 57 | public String getMessage() { |
||
| 58 | return this.message; |
||
| 59 | } |
||
| 60 | |||
| 61 | public void setMessage(String message) { |
||
| 62 | this.message = message;
|
||
| 63 | } |
||
| 64 | } |