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

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

public class LazyResultLoader
extends Object
implements InvocationHandler

Class to lazily load results into objects


Field Summary
protected  SqlMapClientImpl client
           
protected  boolean loaded
           
protected  Object parameterObject
           
protected  Object resultObject
           
protected  String statementName
           
protected  Class targetType
           
 
Constructor Summary
LazyResultLoader(SqlMapClientImpl client, String statementName, Object parameterObject, Class targetType)
          Constructor for a lazy list loader
 
Method Summary
 Object invoke(Object o, Method method, Object[] objects)
           
 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 SqlMapClientImpl client

statementName

protected String statementName

parameterObject

protected Object parameterObject

targetType

protected Class targetType

loaded

protected boolean loaded

resultObject

protected Object resultObject
Constructor Detail

LazyResultLoader

public LazyResultLoader(SqlMapClientImpl client,
                        String statementName,
                        Object parameterObject,
                        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 Object loadResult()
                  throws SQLException
Loads the result

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

invoke

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


Copyright © 2010. All Rights Reserved.