else { return null; }  int columnCount = 0; if ( resultSetList != null ) columnCount = resultSetList.size( ); List computedList = (List) dataSetHandle.getProperty( OdaDataSetHandle.COMPUTED_COLUMNS_PROP ); if ( computedList != null ) columnCount += computedList.size( );  DataSetViewData[] items = new DataSetViewData[columnCount]; DataSetViewData item; int index = 0;  if ( resultSetList != null ) { ResultSetColumn resultSetColumn; HashSet orgColumnNameSet = new HashSet( ); HashSet uniqueColumnNameSet = new HashSet( );  for ( int n = 0; n < resultSetList.size( ); n++ ) { orgColumnNameSet.add( ( (ResultSetColumn) resultSetList.get( n ) ).getColumnName( ) ); }  for ( int i =0; i< resultSetList.size( ); i++ ) { item = new DataSetViewData( ); resultSetColumn = (ResultSetColumn) resultSetList.get( i ); String uniqueName = getUniqueName( orgColumnNameSet, uniqueColumnNameSet, resultSetColumn.getColumnName( ), i );  item.setName( uniqueName );  uniqueColumnNameSet.add( uniqueName ); item.setDataTypeName( resultSetColumn.getDataType( ) ); item.setPosition( resultSetColumn.getPosition( ).intValue( ) ); item.setComputedColumn( false ); item.setDataSetColumnName( uniqueName );  if ( !uniqueName.equals( resultSetColumn.getColumnName( ) ) ) { updateModelColumn( dataSetHandle, item ); } ColumnHintHandle columnHint = findColumnHint( dataSetHandle, uniqueName ); if ( columnHint != null ) { item.setAlias( columnHint.getAlias( ) ); item.setDisplayName( columnHint.getDisplayName( ) ); } items[index] = item; index++; }   if ( computedList != null ) { ComputedColumn computedColumn; Iterator computedColumnIterator = computedList.iterator( ); while ( computedColumnIterator.hasNext( ) ) { item = new DataSetViewData( ); computedColumn = (ComputedColumn) computedColumnIterator.next( ); item.setName( computedColumn.getName( ) ); item.setDataTypeName( computedColumn.getDataType( ) ); item.setComputedColumn( true ); if ( findColumnHint( dataSetHandle, computedColumn.getName( ) ) != null ) { ColumnHintHandle columnHint = findColumnHint( dataSetHandle, computedColumn.getName( ) ); item.setAlias( columnHint.getAlias( ) ); item.setDisplayName( columnHint.getDisplayName( ) ); } items[index] = item; index++; } } return items; } return null;
updateModel( dataSetHandle, items ); return items;
	public DataSetViewData[] populateAllOutputColumns( DataSetHandle dataSetHandle ) throws BirtException	{		List resultSetList = null;		if ( dataSetHandle instanceof OdaDataSetHandle )		{			resultSetList = (List) dataSetHandle.getProperty( OdaDataSetHandle.RESULT_SET_PROP );			dataSetHandle.getPropertyHandle( DataSetHandle.RESULT_SET_HINTS_PROP )					.clearValue( );		}		else		{			return null;		}				int columnCount = 0;		if ( resultSetList != null )			columnCount = resultSetList.size( );		List computedList = (List) dataSetHandle.getProperty( OdaDataSetHandle.COMPUTED_COLUMNS_PROP );		if ( computedList != null )			columnCount += computedList.size( );				DataSetViewData[] items = new DataSetViewData[columnCount];		DataSetViewData item;		int index = 0;		// populate result set columns		if ( resultSetList != null )		{			ResultSetColumn resultSetColumn;			HashSet orgColumnNameSet = new HashSet( );			HashSet uniqueColumnNameSet = new HashSet( );						for ( int n = 0; n < resultSetList.size( ); n++ )			{				orgColumnNameSet.add( ( (ResultSetColumn) resultSetList.get( n ) ).getColumnName( ) );			}						for ( int i =0; i< resultSetList.size( ); i++ )			{				item = new DataSetViewData( );				resultSetColumn = (ResultSetColumn) resultSetList.get( i );				String uniqueName = getUniqueName( orgColumnNameSet,						uniqueColumnNameSet,						resultSetColumn.getColumnName( ),						i );								item.setName( uniqueName );				uniqueColumnNameSet.add( uniqueName );				item.setDataTypeName( resultSetColumn.getDataType( ) );				item.setPosition( resultSetColumn.getPosition( ).intValue( ) );				item.setComputedColumn( false );				item.setDataSetColumnName( uniqueName );				if ( !uniqueName.equals( resultSetColumn.getColumnName( ) ) )				{					updateModelColumn( dataSetHandle, item );				}				ColumnHintHandle columnHint = findColumnHint( dataSetHandle, uniqueName );				if ( columnHint != null )				{					item.setAlias( columnHint.getAlias( ) );					item.setDisplayName( columnHint.getDisplayName( ) );				}				items[index] = item;				index++;			}			// populate computed columns			if ( computedList != null )			{				ComputedColumn computedColumn;				Iterator computedColumnIterator = computedList.iterator( );				while ( computedColumnIterator.hasNext( ) )				{					item = new DataSetViewData( );					computedColumn = (ComputedColumn) computedColumnIterator.next( );					item.setName( computedColumn.getName( ) );					item.setDataTypeName( computedColumn.getDataType( ) );					item.setComputedColumn( true );					if ( findColumnHint( dataSetHandle,							computedColumn.getName( ) ) != null )					{						ColumnHintHandle columnHint = findColumnHint( dataSetHandle,								computedColumn.getName( ) );						item.setAlias( columnHint.getAlias( ) );						item.setDisplayName( columnHint.getDisplayName( ) );					}					items[index] = item;					index++;				}			}			return items;		}		return null;	}