if (cache != null && theResultHash.containsKey(thePKeyName) &&
(cache.containsKey((String)theResultHash.get(thePKeyName)) > -1)) {
//theLog.printDebugInfo("CACHE: (out) "+ theResultHash.get(thePKeyName)+ " :"+theTable);
+
returnEntity = (Entity)cache.get((String)theResultHash.get(thePKeyName));
}
else {
public int containsValue(Object o){
for(int i = 0; i<_cache.size(); i++){
- if(((Entry)_cache.get(i)).getValue().equals(o) )
+ if( _cache.get(i)!=null && ((Entry)_cache.get(i)).getValue().equals(o) )
return i;
}
return -1;