Author: gbayon
Date: Sat Jul 23 10:52:23 2005
New Revision: 224488

URL: http://svn.apache.org/viewcvs?rev=224488&view=rev
Log:
- revert last modification on cache process for QueryForList and QueryForMap 
after remarks of Ron

Modified:
    
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs

Modified: 
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
URL: 
http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs?rev=224488&r1=224487&r2=224488&view=diff
==============================================================================
--- 
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs 
(original)
+++ 
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs 
Sat Jul 23 10:52:23 2005
@@ -552,29 +552,12 @@
                                                CacheKeyType.List);
                                }
 
-                               object listAsObject = 
_statement.CacheModel[key];
-                               // check if this query has alreay been run 
-                               if (listAsObject == CacheModel.NULL_OBJECT) 
-                               { 
-                                       // convert the marker object back into 
a an empty list
-                                       if (_statement.ListClass == null)
-                                       {
-                                               list = new ArrayList();
-                                       }
-                                       else
-                                       {
-                                               list = 
_statement.CreateInstanceOfListClass();
-                                       }
-                               } 
-                               else if (listAsObject == null) 
+                               list = (IList)_statement.CacheModel[key];
+                               if (list == null) 
                                {
                                        list = RunQueryForList(request, 
session, parameterObject, skipResults, maxResults, null);
                                        _statement.CacheModel[key] = list;
                                }
-                               else
-                               {
-                                       list = (IList) listAsObject;
-                               }
                        }
 
                        return list;
@@ -835,21 +818,11 @@
                                                CacheKeyType.Map);
                                }
 
-                               object mapAsObject = _statement.CacheModel[key];
-                               // check if this query has alreay been run 
-                               if (mapAsObject == CacheModel.NULL_OBJECT) 
-                               { 
-                                       // convert the marker object back into 
a an empty hashtable
-                                       map = new Hashtable();
-                               } 
-                               else if (mapAsObject == null) 
+                               map = (IDictionary)_statement.CacheModel[key];
+                               if (map == null) 
                                {
                                        map = RunQueryForMap( request, session, 
parameterObject, keyProperty, valueProperty );
                                        _statement.CacheModel[key] = map;
-                               }
-                               else
-                               {
-                                       map = (IDictionary) mapAsObject;
                                }
                        }
 


Reply via email to