changeset 3287:30f157c7e466

SQ: Filter out meassures which don't have a 'Siebsatz' flys-artifacts/trunk@4953 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 12 Jul 2012 13:58:30 +0000 (2012-07-12)
parents f062b5a90e26
children cf1b769190b7
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/cache.xml flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/SQOverview.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/SQOverviewFactory.java
diffstat 4 files changed, 26 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Thu Jul 12 11:51:32 2012 +0000
+++ b/flys-artifacts/ChangeLog	Thu Jul 12 13:58:30 2012 +0000
@@ -1,3 +1,13 @@
+2012-07-12	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	 src/main/java/de/intevation/flys/artifacts/model/SQOverview.java:
+	 Filter out the meassures which don't have a related 'Siebsatz'.
+
+	 doc/conf/cache.xml: Added forgotten cache for sq-overview.
+
+	 src/main/java/de/intevation/flys/artifacts/model/SQOverviewFactory.java:
+	 Added vim line.
+
 2012-07-12	Christian Lins <christian.lins@intevation.de>
 
 	* doc/conf/default-themes.xml,
--- a/flys-artifacts/doc/conf/cache.xml	Thu Jul 12 11:51:32 2012 +0000
+++ b/flys-artifacts/doc/conf/cache.xml	Thu Jul 12 13:58:30 2012 +0000
@@ -94,6 +94,16 @@
            diskPersistent="true"
            />
 
+    <!-- This one is used to hold the S/Q overviews. -->
+    <cache name="sq-overviews"
+           maxElementsInMemory="15"
+           eternal="false"
+           timeToLiveSeconds="7200"
+           memoryStoreEvictionPolicy="LFU"
+           overflowToDisk="true"
+           diskPersistent="true"
+           />
+
     <!-- This one is used to hold the fixings overviews. -->
     <cache name="fixings-overviews"
            maxElementsInMemory="15"
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/SQOverview.java	Thu Jul 12 11:51:32 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/SQOverview.java	Thu Jul 12 13:58:30 2012 +0000
@@ -91,13 +91,14 @@
         "    m.datum AS datum " +
         "FROM messung m " +
         "    JOIN station s" +
-        "       on m.stationid = s.stationid " +
+        "       ON m.stationid = s.stationid " +
         "    JOIN gewaesser g " +
-        "       on s.gewaesserid = g.gewaesserid " +
+        "       ON s.gewaesserid = g.gewaesserid " +
         "WHERE" +
+        "    m.gsiebsatzid IS NOT NULL AND" +
         "    g.name = :name " +
-        "        order by" +
-        "            s.km, m.datum";
+        "ORDER by" +
+        "    s.km, m.datum";
 
     protected String       riverName;
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/SQOverviewFactory.java	Thu Jul 12 11:51:32 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/SQOverviewFactory.java	Thu Jul 12 13:58:30 2012 +0000
@@ -69,3 +69,4 @@
         return overview.load(session) ? overview : null;
     }
 }
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org