[Lada-commits] [PATCH 3 of 4] Added hibernate model for audit trail

Wald Commits scm-commit at wald.intevation.org
Fri Feb 24 14:29:31 CET 2017


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1487942922 -3600
# Node ID 03670cc25357adcbad4bad08f659d7a70b324483
# Parent  0eece233cbaee2f10b84845294219adad6be4438
Added hibernate model for audit trail.

diff -r 0eece233cbae -r 03670cc25357 src/main/java/de/intevation/lada/model/land/AuditTrail.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/java/de/intevation/lada/model/land/AuditTrail.java	Fri Feb 24 14:28:42 2017 +0100
@@ -0,0 +1,109 @@
+package de.intevation.lada.model.land;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+import javax.json.JsonObject;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import org.hibernate.annotations.Type;
+import org.hibernate.annotations.TypeDef;
+import org.hibernate.annotations.TypeDefs;
+
+import de.intevation.lada.util.data.JsonObjectType;
+
+/**
+ * The persistent class for the audit_trail database table.
+ * 
+ */
+ at Entity
+ at Table(name="audit_trail")
+ at TypeDefs({ @TypeDef(name = "JsonObject", typeClass = JsonObjectType.class) })
+public class AuditTrail implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @Id
+    private Long id;
+
+    private String action;
+
+    @Column(name="action_tstamp_clk")
+    private Timestamp actionTstampClk;
+
+    @Column(name="changed_fields")
+    @Type(type="JsonObject")
+    private JsonObject changedFields;
+
+    @Column(name="object_id")
+    private Integer objectId;
+
+    @Column(name="row_data")
+    @Type(type="JsonObject")
+    private JsonObject rowData;
+
+    @Column(name="table_name")
+    private String tableName;
+
+    public AuditTrail() {
+    }
+
+    public Long getId() {
+        return this.id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getAction() {
+        return this.action;
+    }
+
+    public void setAction(String action) {
+        this.action = action;
+    }
+
+    public Timestamp getActionTstampClk() {
+        return this.actionTstampClk;
+    }
+
+    public void setActionTstampClk(Timestamp actionTstampClk) {
+        this.actionTstampClk = actionTstampClk;
+    }
+
+    public JsonObject getChangedFields() {
+        return this.changedFields;
+    }
+
+    public void setChangedFields(JsonObject changedFields) {
+        this.changedFields = changedFields;
+    }
+
+    public Integer getObjectId() {
+        return this.objectId;
+    }
+
+    public void setObjectId(Integer objectId) {
+        this.objectId = objectId;
+    }
+
+    public JsonObject getRowData() {
+        return this.rowData;
+    }
+
+    public void setRowData(JsonObject rowData) {
+        this.rowData = rowData;
+    }
+
+    public String getTableName() {
+        return this.tableName;
+    }
+
+    public void setTableName(String tableName) {
+        this.tableName = tableName;
+    }
+
+}
diff -r 0eece233cbae -r 03670cc25357 src/main/java/de/intevation/lada/model/land/AuditTrailMessung.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/java/de/intevation/lada/model/land/AuditTrailMessung.java	Fri Feb 24 14:28:42 2017 +0100
@@ -0,0 +1,122 @@
+package de.intevation.lada.model.land;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import org.hibernate.annotations.Type;
+import org.hibernate.annotations.TypeDef;
+import org.hibernate.annotations.TypeDefs;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+import de.intevation.lada.util.data.JsonObjectType;
+
+
+/**
+ * The persistent class for the audit_trail_messung database table.
+ * 
+ */
+ at Entity
+ at Table(name="audit_trail_messung")
+ at TypeDefs({ @TypeDef(name = "JsonObject", typeClass = JsonObjectType.class) })
+public class AuditTrailMessung implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @Id
+    private Long id;
+
+    private String action;
+
+    @Column(name="tstamp")
+    private Timestamp tstamp;
+
+    @Column(name="changed_fields")
+    @Type(type="JsonObject")
+    private JsonNode changedFields;
+
+    @Column(name="messungs_id")
+    private String messungsId;
+
+    @Column(name="object_id")
+    private Integer objectId;
+
+    @Column(name="row_data")
+    @Type(type="JsonObject")
+    private JsonNode rowData;
+
+    @Column(name="table_name")
+    private String tableName;
+
+    public AuditTrailMessung() {
+    }
+
+    public String getAction() {
+        return this.action;
+    }
+
+    public void setAction(String action) {
+        this.action = action;
+    }
+
+    public Timestamp getTstamp() {
+        return this.tstamp;
+    }
+
+    public void setTstamp(Timestamp tstamp) {
+        this.tstamp = tstamp;
+    }
+
+    public JsonNode getChangedFields() {
+        return this.changedFields;
+    }
+
+    public void setChangedFields(JsonNode changedFields) {
+        this.changedFields = changedFields;
+    }
+
+    public Long getId() {
+        return this.id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getMessungsId() {
+        return this.messungsId;
+    }
+
+    public void setMessungsId(String messungsId) {
+        this.messungsId = messungsId;
+    }
+
+    public Integer getObjectId() {
+        return this.objectId;
+    }
+
+    public void setObjectId(Integer objectId) {
+        this.objectId = objectId;
+    }
+
+    public JsonNode getRowData() {
+        return this.rowData;
+    }
+
+    public void setRowData(JsonNode rowData) {
+        this.rowData = rowData;
+    }
+
+    public String getTableName() {
+        return this.tableName;
+    }
+
+    public void setTableName(String tableName) {
+        this.tableName = tableName;
+    }
+
+}
diff -r 0eece233cbae -r 03670cc25357 src/main/java/de/intevation/lada/model/land/AuditTrailProbe.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/java/de/intevation/lada/model/land/AuditTrailProbe.java	Fri Feb 24 14:28:42 2017 +0100
@@ -0,0 +1,115 @@
+package de.intevation.lada.model.land;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+import javax.json.JsonObject;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import org.hibernate.annotations.Type;
+import org.hibernate.annotations.TypeDef;
+import org.hibernate.annotations.TypeDefs;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+import de.intevation.lada.util.data.JsonObjectType;
+
+/**
+ * The persistent class for the audit_trail_probe database table.
+ * 
+ */
+ at Entity
+ at Table(name="audit_trail_probe")
+ at TypeDefs({ @TypeDef(name = "JsonObject", typeClass = JsonObjectType.class) })
+public class AuditTrailProbe implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @Id
+    private Long id;
+
+    @Column(name="changed_fields")
+    @Type(type="JsonObject")
+    private JsonNode changedFields;
+
+    @Column(name="row_data")
+    @Type(type="JsonObject")
+    private JsonNode rowData;
+
+    @Column(name="tstamp")
+    private Timestamp tstamp;
+
+    @Column(name="messungs_id")
+    private Integer messungsId;
+
+    @Column(name="object_id")
+    private Integer objectId;
+
+    @Column(name="probe_id")
+    private Integer probeId;
+
+    @Column(name="table_name")
+    private String tableName;
+
+    public AuditTrailProbe() {
+    }
+
+    public JsonNode getChangedFields() {
+        return this.changedFields;
+    }
+
+    public void setChangedFields(JsonNode changedFields) {
+        this.changedFields = changedFields;
+    }
+
+    public JsonNode getRowData() {
+        return rowData;
+    }
+
+    public void setRowData(JsonNode rowData) {
+        this.rowData = rowData;
+    }
+
+    public Timestamp getTstamp() {
+        return tstamp;
+    }
+
+    public void setTstamp(Timestamp tstamp) {
+        this.tstamp = tstamp;
+    }
+
+    public Integer getMessungsId() {
+        return this.messungsId;
+    }
+
+    public void setMessungsId(Integer messungsId) {
+        this.messungsId = messungsId;
+    }
+
+    public Integer getObjectId() {
+        return this.objectId;
+    }
+
+    public void setObjectId(Integer objectId) {
+        this.objectId = objectId;
+    }
+
+    public Integer getProbeId() {
+        return this.probeId;
+    }
+
+    public void setProbeId(Integer probeId) {
+        this.probeId = probeId;
+    }
+
+    public String getTableName() {
+        return this.tableName;
+    }
+
+    public void setTableName(String tableName) {
+        this.tableName = tableName;
+    }
+
+}


More information about the Lada-commits mailing list