Bug 196745 Data Engine implementation of BPS80- Result Set Sharing
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/ResultIterator.java
*/
	ResultIterator( IServiceForResultSet rService,
			org.eclipse.birt.data.engine.odi.IResultIterator odiResult,
			Scriptable scope ) throws DataException
	{
		Object[] params = {
				rService, odiResult, scope
		};
		logger.entering( ResultIterator.class.getName( ),
				"ResultIterator",
				params );
		assert rService != null
				&& rService.getQueryResults( ) != null && odiResult != null
				&& scope != null;
		this.resultService = rService;
		this.odiResult = odiResult;
		this.scope = scope;
		this.context = rService.getContext( );
		
		if ( this.resultService.getContext( ).getMode( ) == DataEngineContext.MODE_GENERATION
				|| this.resultService.getContext( ).getMode( ) == DataEngineContext.DIRECT_PRESENTATION )
			this.validateManualBindingExpressions( this.resultService.getQueryDefn( )
					.getBindings( ) );
		if( needCache() )
		{
			try 
			{
				createCacheOutputStream( );
				saveMetaData( );
				IOUtil.writeInt(this.rowOutputStream, this.odiResult.getRowCount());