Mercurial > dive4elements > river
changeset 2866:77e849c0d248
Modified Hws.getHws() to retrieve more specific hws.
flys-backend/trunk@4360 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 08 May 2012 13:55:25 +0000 |
parents | a6ef300748c4 |
children | 6442b30d80ec |
files | flys-backend/ChangeLog flys-backend/src/main/java/de/intevation/flys/model/Hws.java |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-backend/ChangeLog Tue May 08 12:13:16 2012 +0000 +++ b/flys-backend/ChangeLog Tue May 08 13:55:25 2012 +0000 @@ -1,3 +1,9 @@ +2012-05-08 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/model/Hws.java: The getHws() function + got a further parameter 'name' to retrieve specific hws only. + + 2012-05-08 Ingo Weinzierl <ingo@intevation.de> * src/main/java/de/intevation/flys/model/Catchment.java: The
--- a/flys-backend/src/main/java/de/intevation/flys/model/Hws.java Tue May 08 12:13:16 2012 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/Hws.java Tue May 08 13:55:25 2012 +0000 @@ -92,12 +92,13 @@ } - public static List<Hws> getHws(int riverId) { + public static List<Hws> getHws(int riverId, String name) { Session session = SessionHolder.HOLDER.get(); Query query = session.createQuery( - "from Hws where river.id =:river_id"); + "from Hws where river.id =:river_id and name=:name"); query.setParameter("river_id", riverId); + query.setParameter("name", name); return query.list(); }