if ( this.getRdSaveUtil( ).getSubQueryID( ) == null ) results.setID( this.getQueryResults( ).getID( ) ); else results.setID( this.getQueryResults( ).getID( ) + "/" + this.getRdSaveUtil( ).getSubQueryID( ) );   ResultIterator resultIt = (ResultIterator) results.getResultIterator( ); resultIt.rdSaveUtil = new RDSaveUtil( resultIt.context, resultIt.getQueryResults( ).getID( ), resultIt.odiResult, subQueryName, odiResult.getCurrentGroupIndex( results.getGroupLevel( ) ), odiResult.getGroupStartAndEndIndex( results.getGroupLevel( ) ) );
IResultIterator resultIt = results.getResultIterator( );  this.getRdSaveUtil( ).processForSubQuery( this.getQueryResults( ) .getID( ), (ResultIterator) resultIt, subQueryName );
	public IResultIterator getSecondaryIterator( String subQueryName,			Scriptable scope ) throws DataException	{		checkStarted( );		QueryResults results = query.execSubquery( odiResult,				subQueryName,				scope );		logger.logp( Level.FINE,				ResultIterator.class.getName( ),				"getSecondaryIterator",				"Returns the secondary result specified by a SubQuery" );		// set query result id		if ( this.getRdSaveUtil( ).getSubQueryID( ) == null )			results.setID( this.getQueryResults( ).getID( ) );		else			results.setID( this.getQueryResults( ).getID( )					+ "/" + this.getRdSaveUtil( ).getSubQueryID( ) );		// init RDSave util of sub query		ResultIterator resultIt = (ResultIterator) results.getResultIterator( );		resultIt.rdSaveUtil = new RDSaveUtil( resultIt.context,				resultIt.getQueryResults( ).getID( ),				resultIt.odiResult,				subQueryName,				odiResult.getCurrentGroupIndex( results.getGroupLevel( ) ),				odiResult.getGroupStartAndEndIndex( results.getGroupLevel( ) ) );		return resultIt;	}