# HG changeset patch # User Ingo Weinzierl # Date 1336485325 0 # Node ID 77e849c0d248a4f8bc146933456878bac44a2e49 # Parent a6ef300748c4d47b141cf05cce491c5e136da346 Modified Hws.getHws() to retrieve more specific hws. flys-backend/trunk@4360 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r a6ef300748c4 -r 77e849c0d248 flys-backend/ChangeLog --- 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 + + * 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 * src/main/java/de/intevation/flys/model/Catchment.java: The diff -r a6ef300748c4 -r 77e849c0d248 flys-backend/src/main/java/de/intevation/flys/model/Hws.java --- 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 getHws(int riverId) { + public static List 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(); }