if ( resultSetList != null )
if ( resultSetList != null && resultSetList.size( ) > 0 )
	public static IResultMetaData retrieveResultMetaData(			DataSetHandle dataSetHandle ) throws BirtException	{		List resultSetList = null;		if ( dataSetHandle instanceof OdaDataSetHandle )		{			resultSetList = (List) dataSetHandle.getProperty( OdaDataSetHandle.RESULT_SET_PROP );		}		else if( dataSetHandle instanceof ScriptDataSetHandle )		{			resultSetList = dataSetHandle.getListProperty( DataSetHandle.RESULT_SET_HINTS_PROP );		}		else		{			return null;		}		List computedList = (List) dataSetHandle.getProperty( OdaDataSetHandle.COMPUTED_COLUMNS_PROP );		List columnMeta = new ArrayList( );		ResultSetColumnDefinition columnDef;		int count = 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++ )			{				resultSetColumn = (ResultSetColumn) resultSetList.get( i );				String columnName = resultSetColumn.getColumnName( );				String uniqueColumnName = getUniqueName( orgColumnNameSet,						uniqueColumnNameSet,						columnName,						i );				uniqueColumnNameSet.add( uniqueColumnName );				if ( !uniqueColumnName.equals( columnName ) )				{					updateModelColumn( dataSetHandle, uniqueColumnName, i + 1 );				}				columnDef = new ResultSetColumnDefinition( uniqueColumnName );				columnDef.setDataTypeName( resultSetColumn.getDataType( ) );				columnDef.setDataType( ModelAdapter.adaptModelDataType( resultSetColumn.getDataType( ) ) );				if ( resultSetColumn.getPosition( ) != null )					columnDef.setColumnPosition( resultSetColumn.getPosition( )							.intValue( ) );				if ( resultSetColumn.getNativeDataType( ) != null )					columnDef.setNativeDataType( resultSetColumn.getNativeDataType( )							.intValue( ) );				if ( findColumnHint( dataSetHandle, uniqueColumnName ) != null )				{					ColumnHintHandle columnHint = findColumnHint( dataSetHandle,							uniqueColumnName );					columnDef.setAlias( columnHint.getAlias( ) );					columnDef.setLableName( columnHint.getDisplayName( ) );				}				columnDef.setComputedColumn( false );				columnMeta.add( columnDef );			}			count += resultSetList.size( );			// populate computed columns			if ( computedList != null )			{				for ( int n = 0; n < computedList.size( ); n++ )				{					orgColumnNameSet.add( ( (ComputedColumn) computedList.get( n ) ).getName( ) );				}								ComputedColumn computedColumn;						for ( int i = 0; i < computedList.size( ); i++ )				{					computedColumn = (ComputedColumn) computedList.get( i );										String columnName = computedColumn.getName( );					String uniqueColumnName = getUniqueName( orgColumnNameSet,							uniqueColumnNameSet,							columnName,							i + count );					uniqueColumnNameSet.add( uniqueColumnName );					if ( !uniqueColumnName.equals( columnName ) )					{						updateComputedColumn( dataSetHandle, uniqueColumnName, columnName );					}										columnDef = new ResultSetColumnDefinition( uniqueColumnName );					columnDef.setDataTypeName( computedColumn.getDataType( ) );					columnDef.setDataType( ModelAdapter.adaptModelDataType( computedColumn.getDataType( ) ) );					if ( findColumnHint( dataSetHandle, uniqueColumnName ) != null )					{						ColumnHintHandle columnHint = findColumnHint( dataSetHandle,								uniqueColumnName );						columnDef.setAlias( columnHint.getAlias( ) );						columnDef.setLableName( columnHint.getDisplayName( ) );					}					columnDef.setComputedColumn( true );					columnMeta.add( columnDef );				}			}			return new ResultMetaData2( columnMeta );		}		return null;	}