com.ibatis.sqlmap.engine.mapping.result.loader
Class LazyResultLoader

java.lang.Object
  extended bycom.ibatis.sqlmap.engine.mapping.result.loader.LazyResultLoader
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class LazyResultLoader
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

Class to lazily load results into objects


Field Summary
protected  ExtendedSqlMapClient client
           
protected  boolean loaded
           
protected  java.lang.Object parameterObject
           
protected  java.lang.Object resultObject
           
protected  java.lang.String statementName
           
protected  java.lang.Class targetType
           
 
Constructor Summary
LazyResultLoader(ExtendedSqlMapClient client, java.lang.String statementName, java.lang.Object parameterObject, java.lang.Class targetType)
          Constructor for a lazy list loader
 
Method Summary
 java.lang.Object invoke(java.lang.Object o, java.lang.reflect.Method method, java.lang.Object[] objects)
           
 java.lang.Object loadResult()
          Loads the result
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

client

protected ExtendedSqlMapClient client

statementName

protected java.lang.String statementName

parameterObject

protected java.lang.Object parameterObject

targetType

protected java.lang.Class targetType

loaded

protected boolean loaded

resultObject

protected java.lang.Object resultObject
Constructor Detail

LazyResultLoader

public LazyResultLoader(ExtendedSqlMapClient client,
                        java.lang.String statementName,
                        java.lang.Object parameterObject,
                        java.lang.Class targetType)
Constructor for a lazy list loader

Parameters:
client - - the client that is creating the lazy list
statementName - - the statement to be used to build the list
parameterObject - - the parameter object to be used to build the list
targetType - - the type we are putting data into
Method Detail

loadResult

public java.lang.Object loadResult()
                            throws java.sql.SQLException
Loads the result

Returns:
the results - a list or object
Throws:
java.sql.SQLException - if there is a problem

invoke

public java.lang.Object invoke(java.lang.Object o,
                               java.lang.reflect.Method method,
                               java.lang.Object[] objects)
                        throws java.lang.Throwable
Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable