Bug 321474 Refactor data set editor pages' codes[28816]
Build Identifier: 20100729 Refactor data set editor pages' codes. Reproducible: Always
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/data/ui/util/DataSetProvider.java
IQueryResults resultSet = executeQuery( session, queryDefn );
		saveResultToDataItems( dataSetHandle, resultSet );
		return resultSet;
	}
	/**
	 * 
	 * @param dataSet
	 * @param resultSet
	 * @throws BirtException
	 */
	private void saveResultToDataItems( DataSetHandle dataSet,
			IQueryResults resultSet ) throws BirtException
	{
		
		IResultMetaData metaData = resultSet.getResultMetaData( );
		
		int columnCount = 0;
		if ( metaData != null )
			columnCount = metaData.getColumnCount( );
		DataSetViewData[] columns = new DataSetViewData[columnCount];
		
		
		
		
		HashSet orgColumnNameSet = new HashSet( );
		
		HashSet uniqueColumnNameSet = new HashSet( );
		for ( int n = 0; n < columns.length; n++ )
		{
			orgColumnNameSet.add( metaData.getColumnName( n + 1 ) );