Bug 319351 Refactor data set editor pages' codes[28193]
Build Identifier: 20100708 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
defaultAnalysisType = DesignChoiceConstants.ANALYSIS_TYPE_DIMENSION;
			}
		}
		if ( columnName.length( ) >= 2 )
		{
			String lastTwoLetters = columnName.substring( columnName.length( ) - 2 );
			if ( lastTwoLetters.equalsIgnoreCase( "id" ) )
			{
				defaultAnalysisType = DesignChoiceConstants.ANALYSIS_TYPE_DIMENSION;
			}
		}
		return defaultAnalysisType;
	}
	/**
	 * get Cached metadata
	 * 
	 * @throws BirtException
	 */
	public DataSetViewData[] populateAllCachedMetaData(
			DataSetHandle dataSetHandle, DataRequestSession session )
			throws BirtException
	{
		IResultMetaData metaData = session.getDataSetMetaData( dataSetHandle,
				true );
		DataSetViewData[] items = new DataSetViewData[metaData.getColumnCount( )];
		for ( int i = 0; i < metaData.getColumnCount( ); i++ )
		{
			items[i] = new DataSetViewData( );
			items[i].setName( metaData.getColumnName( i + 1 ) );
			items[i].setDataTypeName( DataAdapterUtil.adapterToModelDataType( metaData.getColumnType( i + 1 ) ) );