Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
4244:3e62c8f8d475 | 4245:6302db90b63f |
---|---|
53 private String name; | 53 private String name; |
54 | 54 |
55 private boolean kmUp; | 55 private boolean kmUp; |
56 | 56 |
57 private List<Gauge> gauges; | 57 private List<Gauge> gauges; |
58 | |
59 private List<MeasurementStation> measurementstations; | |
58 | 60 |
59 private Unit wstUnit; | 61 private Unit wstUnit; |
60 | 62 |
61 @Id | 63 @Id |
62 @SequenceGenerator( | 64 @SequenceGenerator( |
119 public void setGauges(List<Gauge> gauges) { | 121 public void setGauges(List<Gauge> gauges) { |
120 this.gauges = gauges; | 122 this.gauges = gauges; |
121 } | 123 } |
122 | 124 |
123 | 125 |
126 @OneToMany | |
127 @JoinColumn(name="river_id") | |
128 public List<MeasurementStation> getMeasurementStations() { | |
129 return measurementstations; | |
130 } | |
131 | |
132 public void setMeasurementStations(List<MeasurementStation> mstations) { | |
133 this.measurementstations = mstations; | |
134 } | |
135 | |
124 @OneToOne | 136 @OneToOne |
125 @JoinColumn(name = "wst_unit_id" ) | 137 @JoinColumn(name = "wst_unit_id" ) |
126 public Unit getWstUnit() { | 138 public Unit getWstUnit() { |
127 return wstUnit; | 139 return wstUnit; |
128 } | 140 } |