changeset 203:bfee0e05b4e7

Added an one to many relation to the discharge tables of a gauge. flys-backend/trunk@1560 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 24 Mar 2011 16:47:05 +0000
parents 29a408f80a89
children 764835268e2b
files flys-backend/ChangeLog flys-backend/src/main/java/de/intevation/flys/model/Gauge.java
diffstat 2 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/ChangeLog	Wed Mar 23 16:33:36 2011 +0000
+++ b/flys-backend/ChangeLog	Thu Mar 24 16:47:05 2011 +0000
@@ -1,3 +1,8 @@
+2011-03-24	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/model/Gauge.java:
+	  Added an one to many relation to the discharge tables of a gauge.
+
 2011-03-22	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	Finished import of WSTs.
--- a/flys-backend/src/main/java/de/intevation/flys/model/Gauge.java	Wed Mar 23 16:33:36 2011 +0000
+++ b/flys-backend/src/main/java/de/intevation/flys/model/Gauge.java	Thu Mar 24 16:47:05 2011 +0000
@@ -4,6 +4,8 @@
 
 import java.io.Serializable;
 
+import java.util.List;
+
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.Table;
@@ -13,6 +15,7 @@
 import javax.persistence.GenerationType;
 import javax.persistence.JoinColumn;
 import javax.persistence.OneToOne;
+import javax.persistence.OneToMany;
 
 @Entity
 @Table(name = "gauges")
@@ -27,6 +30,8 @@
     private BigDecimal datum;
     private Range      range;
 
+    private List<DischargeTable> dischargeTables;
+
     public Gauge() {
     }
 
@@ -118,5 +123,15 @@
     public void setRange(Range range) {
         this.range = range;
     }
+
+    @OneToMany
+    @JoinColumn(name = "gauge_id")
+    public List<DischargeTable> getDischargeTables() {
+        return dischargeTables;
+    }
+
+    public void setDischargeTables(List<DischargeTable> dischargeTables) {
+        this.dischargeTables = dischargeTables;
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org