if ( availabeAggrList == null ) availabeAggrList = new ArrayList( ); availabeAggrList.add( obj );
if ( availableAggrList == null ) availableAggrList = new ArrayList( ); if ( !availableAggrList.contains( obj ) ) availableAggrList.add( obj );
	private void calculate( MultiPassExpressionCompiler helper )			throws DataException	{		List aggrList = helper.getAggregateList( 1 );		AggregateTable table = helper.getAggregateTable( );		if ( aggrList == null || table == null )		{			return;		}		// if the expression has the nested aggregate object, the pre_value of		// the temp_aggregate object should be populated in aggregate caculator		if ( helper.hasNestedAggregate( ) )		{			table.calculate( resultIterator,					dataset.getScriptScope( ),					(JSAggrValueObject) dataset.getJSTempAggrValueObject( ) );		}		else		{			table.calculate( resultIterator, dataset.getScriptScope( ) );		}		Scriptable aggrObj = table.getJSAggrValueObject( );		dataset.setJSTempAggrValueObject( aggrObj );;		for ( int i = 0; i < aggrList.size( ); i++ )		{			AggregateObject obj = (AggregateObject) aggrList.get( i );			obj.setAvailable( true );			if ( availabeAggrList == null )				availabeAggrList = new ArrayList( );			availabeAggrList.add( obj );		}	}