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

Class LazyResultLoader

public class LazyResultLoader extends Object implements InvocationHandler

Class to lazily load results into objects
Field Summary
protected SqlMapClientImplclient
protected booleanloaded
protected ObjectparameterObject
protected ObjectresultObject
protected StringstatementName
protected ClasstargetType
Constructor Summary
LazyResultLoader(SqlMapClientImpl client, String statementName, Object parameterObject, Class targetType)
Constructor for a lazy list loader
Method Summary
Objectinvoke(Object o, Method method, Object[] objects)
ObjectloadResult()
Loads the result

Field Detail

client

protected SqlMapClientImpl client

loaded

protected boolean loaded

parameterObject

protected Object parameterObject

resultObject

protected Object resultObject

statementName

protected String statementName

targetType

protected Class targetType

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

invoke

public Object invoke(Object o, Method method, Object[] objects)

loadResult

public Object loadResult()
Loads the result

Returns: the results - a list or object

Throws: SQLException if there is a problem

Copyright © 2011. All Rights Reserved.