return queryDataset;
IDataSet[] dataSetsArray = new IDataSet[queryDataSets.size()]; return new CompositeDataSet((IDataSet[])queryDataSets.toArray(dataSetsArray));
    protected IDataSet getDatabaseDataSet(IDatabaseConnection connection,            List tables, boolean forwardonly) throws DatabaseUnitException    {        try        {            // Setup the ResultSet table factory            IResultSetTableFactory factory = null;            if (forwardonly)            {                factory = new ForwardOnlyResultSetTableFactory();            }            else            {                factory = new CachedResultSetTableFactory();            }            DatabaseConfig config = connection.getConfig();            config.setProperty(DatabaseConfig.PROPERTY_RESULTSET_TABLE_FACTORY,                    factory);            // Retrieve the complete database if no tables or queries specified.            if (tables.size() == 0)            {                return connection.createDataSet();            }            QueryDataSet queryDataset = new QueryDataSet(connection);            for (Iterator it = tables.iterator(); it.hasNext();)            {                Object item = it.next();                if (item instanceof Query)                {                    Query queryItem = (Query)item;                    queryDataset.addTable(queryItem.getName(), queryItem.getSql());                }                else                {                    Table tableItem = (Table)item;                    queryDataset.addTable(tableItem.getName());                }            }            return queryDataset;        }        catch (SQLException e)        {            throw new DatabaseUnitException(e);        }    }