Package org.dbunit.database
Class QueryTableIterator
java.lang.Object
org.dbunit.database.QueryTableIterator
- All Implemented Interfaces:
ITableIterator
Iterator used to iterate over a list of tables using a specific query for retrieving
data for every table.
- Since:
- 1.5.6 (Sep 15, 2003)
- Version:
- $Revision$ $Date$
- Author:
- Manuel Laflamme, gommma (gommma AT users.sourceforge.net), Last changed by: $Author$
-
Constructor Summary
ConstructorsConstructorDescriptionQueryTableIterator(List tableEntries, IDatabaseConnection connection) Constructs an iterator over the given table entries. -
Method Summary
-
Constructor Details
-
QueryTableIterator
Constructs an iterator over the given table entries.- Parameters:
tableEntries- list ofQueryDataSet.TableEntryobjectsconnection- The database connection needed to load data
-
-
Method Details
-
next
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:
nextin interfaceITableIterator- Returns:
trueif the new current table is valid;falseif there are no more table- Throws:
DataSetException- if advancing to the next table fails.
-
nextWithoutClosing
public boolean nextWithoutClosing()Advances to the next table without closing the current one.- Returns:
trueif there is a next table.
-
getTableMetaData
Returns the metadata of the current table.- Specified by:
getTableMetaDatain interfaceITableIterator- Returns:
- the metadata of the current table.
- Throws:
DataSetException- if retrieving the metadata fails.
-
getTable
Returns the current table.- Specified by:
getTablein interfaceITableIterator- Returns:
- the current table.
- Throws:
DataSetException- if retrieving the table fails.
-