# HG changeset patch # User Felix Wolfsteller # Date 1314267561 0 # Node ID 5a3109b8475f0afc9ea069635b4bff8eaa5d4976 # Parent 3383e042a655218fb65f5af74ec8509a83b194a3 Mapping and Accessors for MainValues of Gauge, by Sascha L. Teichmann. flys-backend/trunk@2572 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 3383e042a655 -r 5a3109b8475f flys-backend/ChangeLog --- a/flys-backend/ChangeLog Mon Aug 22 09:31:59 2011 +0000 +++ b/flys-backend/ChangeLog Thu Aug 25 10:19:21 2011 +0000 @@ -1,3 +1,10 @@ +2011-08-25 Felix Wolfsteller + + * src/main/java/de/intevation/flys/model/Gauge.java (getMainValues) + (setMainValues): + New method and mapping to get/set MainValues of a Gauge. Essentially + developed by Sascha L. Teichmann. + 2011-08-22 Ingo Weinzierl * src/main/java/de/intevation/flys/backend/SessionFactoryProvider.java: diff -r 3383e042a655 -r 5a3109b8475f flys-backend/src/main/java/de/intevation/flys/model/Gauge.java --- 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 dischargeTables; + /** MainValues at this Gauge. */ + protected List 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 getMainValues() { + return mainValues; + } + + public void setMainValues(List mainValues) { + this.mainValues = mainValues; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :