[Dive4elements-commits] [PATCH 3 of 8] Add MeasurementStation to the River

Wald Commits scm-commit at wald.intevation.org
Wed Oct 24 17:09:23 CEST 2012


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1351086979 -7200
# Node ID 6302db90b63fcc089591432c65375a05a02d3997
# Parent  3e62c8f8d4753afc779cbdde2a61dd355b435f7c
Add MeasurementStation to the River

Allow to retrieve the MeasurementStation via the River from the database.

diff -r 3e62c8f8d475 -r 6302db90b63f flys-backend/src/main/java/de/intevation/flys/model/River.java
--- a/flys-backend/src/main/java/de/intevation/flys/model/River.java	Wed Oct 24 15:53:58 2012 +0200
+++ b/flys-backend/src/main/java/de/intevation/flys/model/River.java	Wed Oct 24 15:56:19 2012 +0200
@@ -56,6 +56,8 @@
 
     private List<Gauge> gauges;
 
+    private List<MeasurementStation> measurementstations;
+
     private Unit wstUnit;
 
     @Id
@@ -121,6 +123,16 @@
     }
 
 
+    @OneToMany
+    @JoinColumn(name="river_id")
+    public List<MeasurementStation> getMeasurementStations() {
+        return measurementstations;
+    }
+
+    public void setMeasurementStations(List<MeasurementStation> mstations) {
+        this.measurementstations = mstations;
+    }
+
     @OneToOne
     @JoinColumn(name = "wst_unit_id" )
     public Unit getWstUnit() {


More information about the Dive4elements-commits mailing list