Mercurial > lada > lada-server
annotate src/main/java/de/intevation/lada/model/land/AuditTrailProbe.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 | db46646375e3 |
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 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
44 @Column(name="messungs_id") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
45 private Integer messungsId; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
46 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
47 @Column(name="object_id") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
48 private Integer objectId; |
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="probe_id") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
51 private Integer probeId; |
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="table_name") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
54 private String tableName; |
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 public AuditTrailProbe() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
57 } |
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 JsonNode getChangedFields() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
60 return this.changedFields; |
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 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
63 public void setChangedFields(JsonNode changedFields) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
64 this.changedFields = changedFields; |
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 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
67 public JsonNode getRowData() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
68 return rowData; |
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 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
71 public void setRowData(JsonNode rowData) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
72 this.rowData = rowData; |
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 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
75 public Timestamp getTstamp() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
76 return tstamp; |
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 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
79 public void setTstamp(Timestamp tstamp) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
80 this.tstamp = tstamp; |
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 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
83 public Integer getMessungsId() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
84 return this.messungsId; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
85 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
86 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
87 public void setMessungsId(Integer messungsId) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
88 this.messungsId = messungsId; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
89 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
90 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
91 public Integer getObjectId() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
92 return this.objectId; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
93 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
94 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
95 public void setObjectId(Integer objectId) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
96 this.objectId = objectId; |
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 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
99 public Integer getProbeId() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
100 return this.probeId; |
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 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
103 public void setProbeId(Integer probeId) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
104 this.probeId = probeId; |
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 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
107 public String getTableName() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
108 return this.tableName; |
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 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
111 public void setTableName(String tableName) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
112 this.tableName = tableName; |
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 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
115 } |