}
}
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);
//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());
}
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 &&