# HG changeset patch # User Björn Ricks # 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 gauges; + private List measurementstations; + private Unit wstUnit; @Id @@ -121,6 +123,16 @@ } + @OneToMany + @JoinColumn(name="river_id") + public List getMeasurementStations() { + return measurementstations; + } + + public void setMeasurementStations(List mstations) { + this.measurementstations = mstations; + } + @OneToOne @JoinColumn(name = "wst_unit_id" ) public Unit getWstUnit() {