Mercurial > lada > lada-server
annotate src/main/java/de/intevation/lada/model/land/AuditTrailProbe.java @ 1308:db46646375e3
Added action to probe audit trail.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 08 Mar 2017 09:44:11 +0100 |
parents | 03670cc25357 |
children |
rev | line source |
---|---|
1300
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.lada.model.land; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
2 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
3 import java.io.Serializable; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
4 import java.sql.Timestamp; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
5 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
6 import javax.json.JsonObject; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
7 import javax.persistence.Column; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
8 import javax.persistence.Entity; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
9 import javax.persistence.Id; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
10 import javax.persistence.Table; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
11 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
12 import org.hibernate.annotations.Type; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
13 import org.hibernate.annotations.TypeDef; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
14 import org.hibernate.annotations.TypeDefs; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
15 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
16 import com.fasterxml.jackson.databind.JsonNode; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
17 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
18 import de.intevation.lada.util.data.JsonObjectType; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
19 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
20 /** |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
21 * The persistent class for the audit_trail_probe database table. |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
22 * |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
23 */ |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
24 @Entity |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
25 @Table(name="audit_trail_probe") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
26 @TypeDefs({ @TypeDef(name = "JsonObject", typeClass = JsonObjectType.class) }) |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
27 public class AuditTrailProbe implements Serializable { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
28 private static final long serialVersionUID = 1L; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
29 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
30 @Id |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
31 private Long id; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
32 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
33 @Column(name="changed_fields") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
34 @Type(type="JsonObject") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
35 private JsonNode changedFields; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
36 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
37 @Column(name="row_data") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
38 @Type(type="JsonObject") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
39 private JsonNode rowData; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
40 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
41 @Column(name="tstamp") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
42 private Timestamp tstamp; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
43 |
1308
db46646375e3
Added action to probe audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1300
diff
changeset
|
44 @Column(name="action") |
db46646375e3
Added action to probe audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1300
diff
changeset
|
45 private String action; |
db46646375e3
Added action to probe audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1300
diff
changeset
|
46 |
1300
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
47 @Column(name="messungs_id") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
48 private Integer messungsId; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
49 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
50 @Column(name="object_id") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
51 private Integer objectId; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
52 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
53 @Column(name="probe_id") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
54 private Integer probeId; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
55 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
56 @Column(name="table_name") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
57 private String tableName; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
58 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
59 public AuditTrailProbe() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
60 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
61 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
62 public JsonNode getChangedFields() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
63 return this.changedFields; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
64 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
65 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
66 public void setChangedFields(JsonNode changedFields) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
67 this.changedFields = changedFields; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
68 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
69 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
70 public JsonNode getRowData() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
71 return rowData; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
72 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
73 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
74 public void setRowData(JsonNode rowData) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
75 this.rowData = rowData; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
76 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
77 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
78 public Timestamp getTstamp() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
79 return tstamp; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
80 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
81 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
82 public void setTstamp(Timestamp tstamp) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
83 this.tstamp = tstamp; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
84 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
85 |
1308
db46646375e3
Added action to probe audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1300
diff
changeset
|
86 public String getAction() { |
db46646375e3
Added action to probe audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1300
diff
changeset
|
87 return action; |
db46646375e3
Added action to probe audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1300
diff
changeset
|
88 } |
db46646375e3
Added action to probe audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1300
diff
changeset
|
89 |
db46646375e3
Added action to probe audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1300
diff
changeset
|
90 public void setAction(String action) { |
db46646375e3
Added action to probe audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1300
diff
changeset
|
91 this.action = action; |
db46646375e3
Added action to probe audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1300
diff
changeset
|
92 } |
db46646375e3
Added action to probe audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1300
diff
changeset
|
93 |
1300
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
94 public Integer getMessungsId() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
95 return this.messungsId; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
96 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
97 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
98 public void setMessungsId(Integer messungsId) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
99 this.messungsId = messungsId; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
100 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
101 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
102 public Integer getObjectId() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
103 return this.objectId; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
104 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
105 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
106 public void setObjectId(Integer objectId) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
107 this.objectId = objectId; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
108 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
109 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
110 public Integer getProbeId() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
111 return this.probeId; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
112 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
113 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
114 public void setProbeId(Integer probeId) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
115 this.probeId = probeId; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
116 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
117 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
118 public String getTableName() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
119 return this.tableName; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
120 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
121 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
122 public void setTableName(String tableName) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
123 this.tableName = tableName; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
124 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
125 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
126 } |