Bug 324070 Refactor data set editor pages' codes[30967]
Build Identifier: 20100828 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
DataSessionContext context = new DataSessionContext( DataSessionContext.MODE_DIRECT_PRESENTATION,
				dataSet.getModuleHandle( ) );
		DataRequestSession session = DataRequestSession.newSession( context );
		return session.getModelAdaptor( ).adaptDataSet( dataSet );
	}
	/**
	 * 
	 * @param dataSource
	 * @return
	 * @throws BirtException
	 */
	public IBaseDataSourceDesign createDataSourceDesign(
			DataSourceHandle dataSource ) throws BirtException
	{
		DataSessionContext context = new DataSessionContext( DataSessionContext.MODE_DIRECT_PRESENTATION,
				dataSource.getModuleHandle( ) );
		DataRequestSession session = DataRequestSession.newSession( context );
		return session.getModelAdaptor( ).adaptDataSource( dataSource );
	}
	/**
	 * Get cached data set item model. If none is cached, return null;
	 * 
	 * @param ds
	 * @param columns
	 */
	public DataSetViewData[] getCachedDataSetItemModel( DataSetHandle ds,
			boolean needToFocusOnOutput )
	{
		this.needToFocusOnOutput = needToFocusOnOutput;
		DataSetViewData[] result = (DataSetViewData[]) this.htColumns.get( ds );