[Dive4elements-commits] [PATCH 4 of 6] Add HWSLinesInfo and point the old doLinesInfo method on that
Wald Commits
scm-commit at wald.intevation.org
Mon Feb 25 12:46:36 CET 2013
# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1361792038 -3600
# Branch dami
# Node ID ed237d6e8e27e3c5fb15526744cd79b839a3b06c
# Parent e836b2bd683e33a4a5be94ece29e9b2d4fb7f609
Add HWSLinesInfo and point the old doLinesInfo method on that.
doLinesInfo can be removed once HWS usage is properly implemented
diff -r e836b2bd683e -r ed237d6e8e27 flys-backend/src/main/java/de/intevation/flys/backend/SpatialInfo.java
--- a/flys-backend/src/main/java/de/intevation/flys/backend/SpatialInfo.java Mon Feb 25 12:21:57 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/backend/SpatialInfo.java Mon Feb 25 12:33:58 2013 +0100
@@ -12,6 +12,7 @@
import de.intevation.flys.model.Fixpoint;
import de.intevation.flys.model.River;
import de.intevation.flys.model.RiverAxis;
+import de.intevation.flys.model.HWSLine;
public class SpatialInfo {
@@ -142,5 +143,26 @@
logger.info("River contains " + list.size() + " Fixpoints.");
}
}
+
+ @Deprecated
+ protected void doLinesInfo(River river) {
+ doHWSLinesInfo(river);
+ }
+
+ protected void doHWSLinesInfo(River river) {
+ Query query = session.createQuery(
+ "from hws_lines where river =:river");
+ query.setParameter("river", river);
+
+ List<HWSLine> list = query.list();
+
+ if (list == null || list.size() == 0) {
+ logger.warn("No Lines for '" + river.getName() + "' found!");
+ return;
+ }
+ else {
+ logger.info("River contains " + list.size() + " Lines.");
+ }
+ }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :
More information about the Dive4elements-commits
mailing list