com.ibatis.sqlmap.engine.mapping.result.loader
Class LazyResultLoader
java.lang.Object
com.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
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 |
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
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 liststatementName
- - the statement to be used to build the listparameterObject
- - the parameter object to be used to build the listtargetType
- - the type we are putting data into
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