debugging DatabaseCache
authoridfx <idfx>
Wed, 6 Feb 2002 20:27:00 +0000 (20:27 +0000)
committeridfx <idfx>
Wed, 6 Feb 2002 20:27:00 +0000 (20:27 +0000)
source/mir/storage/Database.java
source/mir/storage/DatabaseCache.java

index 691e799..32eb579 100755 (executable)
@@ -523,12 +523,9 @@ public class Database implements StorageObject {
         }
       }
       if (cache != null && theResultHash.containsKey(thePKeyName) &&
-            (cache.containsKey((String)theResultHash.get(thePKeyName)) > -1)) {
-        //theLog.printDebugInfo("CACHE: (out) "+ theResultHash.get(thePKeyName)+ " :"+theTable);
-        System.out.println("containskey: "+cache.containsKey((String)theResultHash.get(thePKeyName)));
+          (cache.containsKey((String)theResultHash.get(thePKeyName)) > -1)) {
         returnEntity = (Entity)cache.get((String)theResultHash.get(thePKeyName));
-      }
-      else {
+      } else {
         if (theEntityClass != null) {
           returnEntity = (Entity)theEntityClass.newInstance();
           returnEntity.setValues(theResultHash);
@@ -537,13 +534,11 @@ public class Database implements StorageObject {
             //theLog.printDebugInfo("CACHE: ( in) " + returnEntity.getId() + " :"+theTable);
             cache.put(returnEntity.getId(), returnEntity);
           }
-        }
-        else {
+        } else {
           throwStorageObjectException("Interner Fehler theEntityClass nicht gesetzt!");
         }
       }
-    }           // try
-    catch (IllegalAccessException e) {
+    } catch (IllegalAccessException e) {
       throwStorageObjectException("Kein Zugriff! -- " + e.toString());
     } catch (IOException e) {
       throwStorageObjectException("IOException! -- " + e.toString());
index fe5c105..4cf3fe5 100755 (executable)
@@ -52,7 +52,6 @@ public class DatabaseCache {
   }
   
   public Object get(String key){
-    System.out.println(_cache.size() +" "+ _counter);
     for(int i = 0; i<_cache.size(); i++){
       if( _cache.get(i) != null &&
         ((Entry)_cache.get(i)).getKey(key) != null &&