/** * Loads a result lazily * * @param client - the client creating the object * @param statementName - the name of the statement to be used * @param parameterObject - the parameters for the statement * @param targetType - the target type of the result * @return the loaded result * @throws SQLException */ public static Object loadResult(SqlMapClientImpl client, String statementName, Object parameterObject, Class targetType) throws SQLException { Object value = null; if (client.isLazyLoadingEnabled()) { if (client.isEnhancementEnabled()) { EnhancedLazyResultLoader lazy = new EnhancedLazyResultLoader(client, statementName, parameterObject, targetType); value = lazy.loadResult(); } else { LazyResultLoader lazy = new LazyResultLoader(client, statementName, parameterObject, targetType); value = lazy.loadResult(); } } else { value = getResult(client, statementName, parameterObject, targetType); } return value; }
/** * Loads a result lazily * * @param client - the client creating the object * @param statementName - the name of the statement to be used * @param parameterObject - the parameters for the statement * @param targetType - the target type of the result * @return the loaded result * @throws SQLException */ public static Object loadResult(SqlMapClientImpl client, String statementName, Object parameterObject, Class targetType) throws SQLException { Object value = null; if (client.isLazyLoadingEnabled()) { if (client.isEnhancementEnabled()) { EnhancedLazyResultLoader lazy = new EnhancedLazyResultLoader(client, statementName, parameterObject, targetType); value = lazy.loadResult(); } else { LazyResultLoader lazy = new LazyResultLoader(client, statementName, parameterObject, targetType); value = lazy.loadResult(); } } else { value = getResult(client, statementName, parameterObject, targetType); } return value; }