changeset 3788:71834666447d

Moved some code over from flys-artifacts. flys-backend/trunk@5400 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sat, 08 Sep 2012 13:31:03 +0000
parents 3b301859ee19
children 9f92c42b7a81
files flys-backend/ChangeLog flys-backend/src/main/java/de/intevation/flys/model/Gauge.java
diffstat 2 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/ChangeLog	Fri Sep 07 09:19:27 2012 +0000
+++ b/flys-backend/ChangeLog	Sat Sep 08 13:31:03 2012 +0000
@@ -1,3 +1,8 @@
+2012-09-09	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/model/Gauge.java:
+	  Moved some code over from flys-artifacts.
+
 2012-09-07  Ingo Weinzierl <ingo@intevation.de>
 
 	Tagged module as '2.9'.
--- a/flys-backend/src/main/java/de/intevation/flys/model/Gauge.java	Fri Sep 07 09:19:27 2012 +0000
+++ b/flys-backend/src/main/java/de/intevation/flys/model/Gauge.java	Sat Sep 08 13:31:03 2012 +0000
@@ -284,5 +284,18 @@
         return new Object[] { days, qs };
     }
 
+
+    /** XXX: Can some one (ingo) tell me, what's the difference
+             to simple call of  getMainValues()? */
+    public List<MainValue> fetchMainValues() {
+        // TODO: Use getMainValues() instead.
+        Session session = SessionHolder.HOLDER.get();
+
+        Query query = session.createQuery(
+            "from MainValue where gauge=:gauge");
+        query.setParameter("gauge", this);
+
+        return query.list();
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org