return new QueryResults( new QueryService( this.dataEngineContext,
return new QueryResults( new ServiceForQueryResults( this.dataEngineContext,
	QueryResults doPrepare( IQueryResults outerResults,			Scriptable scope, QueryExecutor executor,			PreparedDataSourceQuery dataSourceQuery ) throws DataException	{		if ( this.baseQueryDefn == null )		{			// we are closed			DataException e = new DataException(ResourceConstants.PREPARED_QUERY_CLOSED);			logger.logp( Level.WARNING,					PreparedQuery.class.getName( ),					"doPrepare",					"PreparedQuery instance is closed.",					e );			throw e;		}				// pass the prepared query's pass thru context to its executor		executor.setAppContext( this.appContext );				//here prepare the execution. After the preparation the result metadata is available by		//calling getResultClass, and the query is ready for execution.		logger.finer( "Start to prepare the execution." );		executor.prepareExecution( outerResults, scope );		logger.finer( "Finish preparing the execution." );			    return new QueryResults( new QueryService( this.dataEngineContext,				dataSourceQuery,				queryService,				executor,				this.baseQueryDefn,				this.exprManager ),				executor.getQueryScope( ),				executor.getNestedLevel( ) + 1 );	}