if ( LOG.isTraceEnabled() ) {
LOG.tracev( "Scroll SQL query: {0}", customQuery.getSQL() );
}
CustomLoader loader = new CustomLoader( customQuery, getFactory() );
autoFlushIfRequired( loader.getQuerySpaces() );
dontFlushFromFind++; //stops flush being called multiple times if this method is recursively called
try {
return loader.scroll(queryParameters, this);
}
finally {
delayedAfterCompletion();
dontFlushFromFind--;
}