diff src/main/java/de/intevation/lada/model/land/ZusatzWert.java @ 1033:812e0cace5ba schema-update

Added additional attributes to complete the model.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 31 Aug 2016 15:49:40 +0200
parents 1c41c7b8f7c2
children
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/model/land/ZusatzWert.java	Wed Aug 31 15:47:52 2016 +0200
+++ b/src/main/java/de/intevation/lada/model/land/ZusatzWert.java	Wed Aug 31 15:49:40 2016 +0200
@@ -8,6 +8,8 @@
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.OneToOne;
 import javax.persistence.Table;
 import javax.persistence.Transient;
 
@@ -45,12 +47,19 @@
     @Column(name="tree_modified")
     private Timestamp treeModified;
 
+    @OneToOne
+    @JoinColumn(name="probe_id", insertable=false, updatable=false)
+    private Probe probe;
+
     @Transient
     private boolean owner;
 
     @Transient
     private boolean readonly;
 
+    @Transient
+    private Timestamp parentModified;
+
     public ZusatzWert() {
     }
 
@@ -146,4 +155,14 @@
         this.readonly = readonly;
     }
 
+    public Timestamp getParentModified() {
+        if (this.parentModified == null && this.probe != null) {
+            return this.probe.getTreeModified();
+        }
+        return this.parentModified;
+    }
+
+    public void setParentModified(Timestamp parentModified) {
+        this.parentModified = parentModified;
+    }
 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)