changeset 2151:eb1a676c0d6e

Cleanups. flys-artifacts/trunk@3733 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 20 Jan 2012 08:35:03 +0000
parents 0fa37d4de13d
children 2336927cb096
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/StaticHYKState.java
diffstat 2 files changed, 12 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Fri Jan 20 08:31:25 2012 +0000
+++ b/flys-artifacts/ChangeLog	Fri Jan 20 08:35:03 2012 +0000
@@ -1,3 +1,8 @@
+2012-01-20	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/states/StaticHYKState.java:
+	  Cleanup. Mark spot where State-based caching could happen.
+	  
 2012-01-20	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/HYKFacet.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/StaticHYKState.java	Fri Jan 20 08:31:25 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/StaticHYKState.java	Fri Jan 20 08:35:03 2012 +0000
@@ -49,22 +49,14 @@
         logger.debug("StaticHYKState.compute");
         String id = getID();
 
-        // TODO caching!
-
-        /*
-        WQKms res = old instanceof WQKms
-            ? (WQKms)old
-            : winfo.getWQKms();
+        // Prepare comparison against cached result.
+        List<HYKFactory.Zone> resZones = old instanceof List
+            ? (List<HYKFactory.Zone>)old
+            : null;
 
-        WQKms wqkms = res;
-        */
+        // TODO Compare against cached object.
 
-        // List<Zone> res;
-        Object res = null;
-
-        // Compare against cached objects.
-
-        // Need river id and km.
+        // Get Zones from HYKFactory
         List<HYKFactory.Zone> zones = (List<HYKFactory.Zone>)
             HYKFactory.getHYKs(hyk.getHykId(), hyk.getKm());
 
@@ -73,8 +65,8 @@
             return zones;
         }
 
+        // Spawn Facets.
         Facet facet = new HYKFacet(0, HYKFactory.getHykName(hyk.getHykId()));
-
         facets.add(facet);
 
         return zones;

http://dive4elements.wald.intevation.org