queryDefn.setDataSetName( getDataSetFromHandle( ).getName( ) );
queryDefn.setDataSetName( getDataSetFromHandle( ).getQualifiedName( ) );
	protected final List getPreviewRowData( String[] columnExpression,			int rowCount, boolean isStringType ) throws ChartException	{		ArrayList dataList = new ArrayList( );		// Set thread context class loader so Rhino can find POJOs in workspace		// projects		ClassLoader oldContextLoader = Thread.currentThread( )				.getContextClassLoader( );		ClassLoader parentLoader = oldContextLoader;		if ( parentLoader == null )			parentLoader = this.getClass( ).getClassLoader( );		ClassLoader newContextLoader = getCustomScriptClassLoader( parentLoader );		Thread.currentThread( ).setContextClassLoader( newContextLoader );		try		{			QueryDefinition queryDefn = new QueryDefinition( );			queryDefn.setMaxRows( getMaxRow( ) );			queryDefn.setDataSetName( getDataSetFromHandle( ).getName( ) );			DataRequestSession session = DataRequestSession.newSession( new DataSessionContext( DataSessionContext.CACHE_USE_ALWAYS,					getReportDesignHandle( ) ) );			for ( int i = 0; i < columnExpression.length; i++ )			{				queryDefn.addResultSetExpression( columnExpression[i],						new ScriptExpression( columnExpression[i] ) );			}			IQueryResults actualResultSet = session.executeQuery( queryDefn,					itemHandle.getPropertyHandle( ReportItemHandle.PARAM_BINDINGS_PROP )							.iterator( ),					itemHandle.getPropertyHandle( ExtendedItemHandle.FILTER_PROP )							.iterator( ),					getColumnDataBindings( ) );			if ( actualResultSet != null )			{				String[] expressions = columnExpression;				int columnCount = expressions.length;				IResultIterator iter = actualResultSet.getResultIterator( );				while ( iter.next( ) )				{					if ( isStringType )					{						String[] record = new String[columnCount];						for ( int n = 0; n < columnCount; n++ )						{							record[n] = iter.getString( expressions[n] );						}						dataList.add( record );					}					else					{						Object[] record = new Object[columnCount];						for ( int n = 0; n < columnCount; n++ )						{							record[n] = iter.getValue( expressions[n] );						}						dataList.add( record );					}				}				actualResultSet.close( );			}		}		catch ( BirtException e )		{			throw new ChartException( ChartReportItemUIActivator.ID,					ChartException.DATA_BINDING,					e );		}		finally		{			// Restore old thread context class loader			Thread.currentThread( ).setContextClassLoader( oldContextLoader );		}		return dataList;	}