Mercurial > dive4elements > river
diff flys-backend/src/main/java/de/intevation/flys/model/HydrBoundary.java @ 5528:33d735f5433e
Merged.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 02 Apr 2013 08:58:24 +0200 |
parents | 87dab419b924 |
children |
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/model/HydrBoundary.java Thu Mar 28 12:11:13 2013 +0100 +++ b/flys-backend/src/main/java/de/intevation/flys/model/HydrBoundary.java Tue Apr 02 08:58:24 2013 +0200 @@ -91,6 +91,18 @@ this.geom = geom; } + public static List<HydrBoundary> getHydrBoundaries(int riverId, String name, int kindId) { + Session session = SessionHolder.HOLDER.get(); + + Query query = session.createQuery( + "from HydrBoundary where river.id =:river_id and name=:name" + + " and kind.id=:kind_id"); + query.setParameter("river_id", riverId); + query.setParameter("name", name); + query.setParameter("kind_id", kindId); + + return query.list(); + } public static List<HydrBoundary> getHydrBoundaries(int riverId, String name) { Session session = SessionHolder.HOLDER.get();