org.dbunit.database
Class QueryTableIterator

java.lang.Object
  extended by org.dbunit.database.QueryTableIterator
All Implemented Interfaces:
ITableIterator

public class QueryTableIterator
extends java.lang.Object
implements ITableIterator

Iterator used to iterate over a list of tables using a specific query for retrieving data for every table.

Since:
Sep 15, 2003
Version:
$Revision: 750 $
Author:
Manuel Laflamme

Constructor Summary
QueryTableIterator(java.util.List tableEntries, IDatabaseConnection connection)
           
 
Method Summary
 ITable getTable()
          Returns the current table.
 ITableMetaData getTableMetaData()
          Returns the metadata of the current table.
 boolean next()
          Position this iterator to the next table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryTableIterator

public QueryTableIterator(java.util.List tableEntries,
                          IDatabaseConnection connection)
Parameters:
tableEntries - list of QueryDataSet.TableEntry objects
connection - The database connection needed to load data
Method Detail

next

public boolean next()
             throws DataSetException
Position this iterator to the next table. The iterator is initially positioned before the first table; the first call to the method next makes the first table the current table; the second call makes the second table the current table, and so on.

Specified by:
next in interface ITableIterator
Returns:
true if the new current table is valid; false if there are no more table
Throws:
DataSetException

getTableMetaData

public ITableMetaData getTableMetaData()
                                throws DataSetException
Returns the metadata of the current table.

Specified by:
getTableMetaData in interface ITableIterator
Throws:
DataSetException

getTable

public ITable getTable()
                throws DataSetException
Returns the current table.

Specified by:
getTable in interface ITableIterator
Throws:
DataSetException


Copyright © 2002-2008. All Rights Reserved.