if ( scope == null ) { scope = DataEngineImpl.createSubscope( getDataEngine().getSharedScope() ); }
	protected QueryResults doPrepare( IQueryResults outerResults, Scriptable scope ) throws DataException	{		if ( this.queryDefn == 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;		}				Executor executor = newExecutor();				// Create a new sub scope if none is provided		if ( scope == null )	    {			scope = DataEngineImpl.createSubscope( getDataEngine().getSharedScope() );	    }		//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( getDataSourceQuery(), this, executor);	}