Mercurial > dive4elements > river
diff flys-backend/src/main/java/de/intevation/flys/model/Gauge.java @ 1233:5a3109b8475f
Mapping and Accessors for MainValues of Gauge, by Sascha L. Teichmann.
flys-backend/trunk@2572 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 25 Aug 2011 10:19:21 +0000 |
parents | 46bb2b9e0bdc |
children | fe89d6cf55fb |
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/model/Gauge.java Mon Aug 22 09:31:59 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/Gauge.java Thu Aug 25 10:19:21 2011 +0000 @@ -21,7 +21,7 @@ import org.hibernate.Query; import de.intevation.flys.backend.SessionHolder; - +import de.intevation.flys.model.MainValue; @Entity @Table(name = "gauges") @@ -40,6 +40,9 @@ private List<DischargeTable> dischargeTables; + /** MainValues at this Gauge. */ + protected List<MainValue> mainValues; + public Gauge() { } @@ -156,7 +159,7 @@ /** * Returns min and max W values of this gauge. * - * @return the min and max W value of this gauge [min,max]. + * @return the min and max W value of this gauge [min,max]. */ public double[] determineMinMaxW(int scale) { Session session = SessionHolder.HOLDER.get(); @@ -189,5 +192,15 @@ ((BigDecimal) result[1]).doubleValue() * scale} : null; } + + @OneToMany + @JoinColumn(name = "gauge_id") + public List<MainValue> getMainValues() { + return mainValues; + } + + public void setMainValues(List<MainValue> mainValues) { + this.mainValues = mainValues; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :