lazy loading support java.util.Set interface
--------------------------------------------

                 Key: IBATIS-487
                 URL: https://issues.apache.org/jira/browse/IBATIS-487
             Project: iBatis for Java
          Issue Type: New Feature
          Components: SQL Maps
    Affects Versions: 2.3.1
            Reporter: posture.woo
             Fix For: 2.3.1


EnhancedLazyResultLoader and LazyResultLoader class can not support 
java.util.Set interface. In the loadResult method, change return 
Proxy.newProxyInstance(cl, LIST_INTERFACES, handler) to 
if (Collection.class.isAssignableFrom(targetType)) {
      InvocationHandler handler = new LazyResultLoader(client, statementName, 
parameterObject, targetType);
      ClassLoader cl = targetType.getClassLoader();
      if (Set.class.isAssignableFrom(targetType)) {
      return Proxy.newProxyInstance(cl, new Class[]{Set.class}, handler);
      } else  {
        return Proxy.newProxyInstance(cl, LIST_INTERFACES, handler);
     }    
} else {
    return ResultLoader.getResult(client, statementName, parameterObject, 
targetType);
}


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to