Mercurial > dive4elements > river
diff flys-backend/src/main/java/de/intevation/flys/model/River.java @ 4245:6302db90b63f
Add MeasurementStation to the River
Allow to retrieve the MeasurementStation via the River from the database.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Wed, 24 Oct 2012 15:56:19 +0200 |
parents | 371e38af6f79 |
children | 87c3a3ac6ddf |
line wrap: on
line diff
--- 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() {