diff artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFactory.java @ 8151:a709e6334c4a

IDs can be assumed to be unique.
author Tom Gottfried <tom@intevation.de>
date Thu, 28 Aug 2014 18:42:20 +0200
parents b5cba2690347
children c3dfb18dcefc
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFactory.java	Thu Aug 28 15:34:57 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFactory.java	Thu Aug 28 18:42:20 2014 +0200
@@ -51,14 +51,13 @@
     /**
      * Get BedHeightData for given type and height_id, caring about the cache.
      */
-    public static BedHeightData getHeight(String type, int height_id, int time) {
+    public static BedHeightData getHeight(String type, int height_id) {
         log.debug("BedHeightFactory.getHeight");
-        Cache cache = CacheFactory.getCache(StaticBedHeightCacheKey.CACHE_NAME);
+        Cache cache = CacheFactory.getCache("bedheight-value-table-static");
 
-        StaticBedHeightCacheKey cacheKey;
+        String cacheKey = Integer.toString(height_id);
 
         if (cache != null) {
-            cacheKey = new StaticBedHeightCacheKey(height_id, time);
             Element element = cache.get(cacheKey);
             if (element != null) {
                 log.debug("Got static bedheight values from cache");
@@ -69,7 +68,7 @@
             cacheKey = null;
         }
 
-        BedHeightData values = getBedHeightUncached(type, height_id, time);
+        BedHeightData values = getBedHeightUncached(type, height_id);
 
         if (values != null && cacheKey != null) {
             log.debug("Store static bed height values in cache.");
@@ -111,8 +110,7 @@
      */
     public static BedHeightData getBedHeightUncached(
         String type,
-        int height_id,
-        int time)
+        int height_id)
     {
         if (log.isDebugEnabled()) {
             log.debug("BedHeightFactory.getBedHeightUncached");

http://dive4elements.wald.intevation.org