Mercurial > lada > lada-server
annotate src/main/java/de/intevation/lada/model/land/AuditTrail.java @ 1345:883ab3a6f525 tip
changed version to 2.7-SNAPSHOT after release2.6.2 for default branch
author | Marco Lechner, Bundesamt fuer Strahlenschutz, SW 2.1 <mlechner@bfs.de> |
---|---|
date | Fri, 07 Apr 2017 11:14:37 +0200 |
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 de.intevation.lada.util.data.JsonObjectType; |
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 /** |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
19 * The persistent class for the audit_trail database table. |
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 */ |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
22 @Entity |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
23 @Table(name="audit_trail") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
24 @TypeDefs({ @TypeDef(name = "JsonObject", typeClass = JsonObjectType.class) }) |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
25 public class AuditTrail implements Serializable { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
26 private static final long serialVersionUID = 1L; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
27 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
28 @Id |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
29 private Long id; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
30 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
31 private String action; |
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="action_tstamp_clk") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
34 private Timestamp actionTstampClk; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
35 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
36 @Column(name="changed_fields") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
37 @Type(type="JsonObject") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
38 private JsonObject changedFields; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
39 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
40 @Column(name="object_id") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
41 private Integer objectId; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
42 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
43 @Column(name="row_data") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
44 @Type(type="JsonObject") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
45 private JsonObject rowData; |
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="table_name") |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
48 private String tableName; |
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 public AuditTrail() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
51 } |
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 public Long getId() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
54 return this.id; |
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 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
57 public void setId(Long id) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
58 this.id = id; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
59 } |
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 public String getAction() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
62 return this.action; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
63 } |
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 public void setAction(String action) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
66 this.action = action; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
67 } |
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 public Timestamp getActionTstampClk() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
70 return this.actionTstampClk; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
71 } |
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 public void setActionTstampClk(Timestamp actionTstampClk) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
74 this.actionTstampClk = actionTstampClk; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
75 } |
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 public JsonObject getChangedFields() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
78 return this.changedFields; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
79 } |
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 public void setChangedFields(JsonObject changedFields) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
82 this.changedFields = changedFields; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
83 } |
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 public Integer getObjectId() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
86 return this.objectId; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
87 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
88 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
89 public void setObjectId(Integer objectId) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
90 this.objectId = objectId; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
91 } |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
92 |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
93 public JsonObject getRowData() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
94 return this.rowData; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
95 } |
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 public void setRowData(JsonObject rowData) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
98 this.rowData = rowData; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
99 } |
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 public String getTableName() { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
102 return this.tableName; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
103 } |
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 public void setTableName(String tableName) { |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
106 this.tableName = tableName; |
03670cc25357
Added hibernate model for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
107 } |
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 } |