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
{
		IPreparedQuery preparedQuery = session.prepare( queryDefn );
		IQueryResults resultSet = (IQueryResults) session.execute( preparedQuery,
				null,
				new ScriptContext( ) );
		return resultSet;
	}
	/**
	 * 
	 * @param dataSetDesign
	 * @param rowsToReturn
	 * @return
	 */
	public final QueryDefinition getQueryDefinition(
			IBaseDataSetDesign dataSetDesign, int rowsToReturn )
	{
		if ( dataSetDesign != null )
		{
			QueryDefinition defn = new QueryDefinition( null );
			defn.setDataSetName( dataSetDesign.getName( ) );
			if ( rowsToReturn > 0 )
			{
				defn.setMaxRows( rowsToReturn );
			}
			List parameters = dataSetDesign.getParameters( );
			Iterator iter = parameters.iterator( );
			while ( iter.hasNext( ) )
			{
				ParameterDefinition paramDefn = (ParameterDefinition) iter.next( );
				if ( paramDefn.isInputMode( ) )