comparison flys-backend/src/main/java/de/intevation/flys/model/HydrBoundaryPoly.java @ 5515:87dab419b924

Properly handle hydr_boundaries and hydr_boundaries_poly in datacage This also fixes hydr_boundaries_poly which refered to the wrong table
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 28 Mar 2013 17:13:53 +0100
parents a2600507761e
children
comparison
equal deleted inserted replaced
5514:4c4fed23693f 5515:87dab419b924
102 query.setParameter("name", name); 102 query.setParameter("name", name);
103 103
104 return query.list(); 104 return query.list();
105 } 105 }
106 106
107 public static List<HydrBoundaryPoly> getHydrBoundaries(int riverId,
108 int kind, int sectie, int sobek) {
109 Session session = SessionHolder.HOLDER.get();
110
111 String filter = " where river.id =:river_id";
112
113 if (kind != -1) {
114 filter += " and kind = " + kind;
115 }
116 if (sectie != -1) {
117 filter += " and sectie = " + sectie;
118 }
119 if (sobek != -1){
120 filter += " and sobek = " + sobek;
121 }
122
123 Query query = session.createQuery("from HydrBoundaryPoly" + filter);
124 query.setParameter("river_id", riverId);
125 return query.list();
126 }
127
107 /** 128 /**
108 * Get sectie. 129 * Get sectie.
109 * 130 *
110 * @return sectie as SectieKind. 131 * @return sectie as SectieKind.
111 */ 132 */

http://dive4elements.wald.intevation.org