# HG changeset patch # User Sascha L. Teichmann # Date 1347111063 0 # Node ID 71834666447da386bb6c79ede8654cc3239797ef # Parent 3b301859ee1961cd2265f5e7d235c7ce4f0f4e08 Moved some code over from flys-artifacts. flys-backend/trunk@5400 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 3b301859ee19 -r 71834666447d flys-backend/ChangeLog --- 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 + + * src/main/java/de/intevation/flys/model/Gauge.java: + Moved some code over from flys-artifacts. + 2012-09-07 Ingo Weinzierl Tagged module as '2.9'. diff -r 3b301859ee19 -r 71834666447d flys-backend/src/main/java/de/intevation/flys/model/Gauge.java --- 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 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 :