Mercurial > lada > lada-server
comparison src/main/java/de/intevation/lada/model/land/AuditTrail.java @ 1300:03670cc25357
Added hibernate model for audit trail.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 24 Feb 2017 14:28:42 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1299:0eece233cbae | 1300:03670cc25357 |
---|---|
1 package de.intevation.lada.model.land; | |
2 | |
3 import java.io.Serializable; | |
4 import java.sql.Timestamp; | |
5 | |
6 import javax.json.JsonObject; | |
7 import javax.persistence.Column; | |
8 import javax.persistence.Entity; | |
9 import javax.persistence.Id; | |
10 import javax.persistence.Table; | |
11 | |
12 import org.hibernate.annotations.Type; | |
13 import org.hibernate.annotations.TypeDef; | |
14 import org.hibernate.annotations.TypeDefs; | |
15 | |
16 import de.intevation.lada.util.data.JsonObjectType; | |
17 | |
18 /** | |
19 * The persistent class for the audit_trail database table. | |
20 * | |
21 */ | |
22 @Entity | |
23 @Table(name="audit_trail") | |
24 @TypeDefs({ @TypeDef(name = "JsonObject", typeClass = JsonObjectType.class) }) | |
25 public class AuditTrail implements Serializable { | |
26 private static final long serialVersionUID = 1L; | |
27 | |
28 @Id | |
29 private Long id; | |
30 | |
31 private String action; | |
32 | |
33 @Column(name="action_tstamp_clk") | |
34 private Timestamp actionTstampClk; | |
35 | |
36 @Column(name="changed_fields") | |
37 @Type(type="JsonObject") | |
38 private JsonObject changedFields; | |
39 | |
40 @Column(name="object_id") | |
41 private Integer objectId; | |
42 | |
43 @Column(name="row_data") | |
44 @Type(type="JsonObject") | |
45 private JsonObject rowData; | |
46 | |
47 @Column(name="table_name") | |
48 private String tableName; | |
49 | |
50 public AuditTrail() { | |
51 } | |
52 | |
53 public Long getId() { | |
54 return this.id; | |
55 } | |
56 | |
57 public void setId(Long id) { | |
58 this.id = id; | |
59 } | |
60 | |
61 public String getAction() { | |
62 return this.action; | |
63 } | |
64 | |
65 public void setAction(String action) { | |
66 this.action = action; | |
67 } | |
68 | |
69 public Timestamp getActionTstampClk() { | |
70 return this.actionTstampClk; | |
71 } | |
72 | |
73 public void setActionTstampClk(Timestamp actionTstampClk) { | |
74 this.actionTstampClk = actionTstampClk; | |
75 } | |
76 | |
77 public JsonObject getChangedFields() { | |
78 return this.changedFields; | |
79 } | |
80 | |
81 public void setChangedFields(JsonObject changedFields) { | |
82 this.changedFields = changedFields; | |
83 } | |
84 | |
85 public Integer getObjectId() { | |
86 return this.objectId; | |
87 } | |
88 | |
89 public void setObjectId(Integer objectId) { | |
90 this.objectId = objectId; | |
91 } | |
92 | |
93 public JsonObject getRowData() { | |
94 return this.rowData; | |
95 } | |
96 | |
97 public void setRowData(JsonObject rowData) { | |
98 this.rowData = rowData; | |
99 } | |
100 | |
101 public String getTableName() { | |
102 return this.tableName; | |
103 } | |
104 | |
105 public void setTableName(String tableName) { | |
106 this.tableName = tableName; | |
107 } | |
108 | |
109 } |