code: public SelectIterator<T, ID> buildIterator(BaseDaoImpl<T, ID> classDao, ConnectionSource connectionSource,
  			PreparedStmt<T> preparedStmt, ObjectCache objectCache, int resultFlags) throws SQLException {
  		DatabaseConnection connection = connectionSource.getReadOnlyConnection(tableInfo.getTableName());
  		CompiledStatement compiledStatement = null;
  		try {
  			compiledStatement = preparedStmt.compile(connection, StatementType.SELECT, resultFlags);
  			SelectIterator<T, ID> iterator = new SelectIterator<T, ID>(tableInfo.getDataClass(), classDao, preparedStmt,
  					connectionSource, connection, compiledStatement, preparedStmt.getStatement(), objectCache);
  			connection = null;
  			compiledStatement = null;
  			return iterator;
  		} finally {
  			IOUtils.closeThrowSqlException(compiledStatement, "compiled statement");
  			if (connection != null) {
  				connectionSource.releaseConnection(connection);
  			}
  		}
  	}
docs: Create and return an {@link SelectIterator} for the class using a prepared statement.