|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dbunit.dataset.AbstractDataSet
org.dbunit.database.QueryDataSet
public class QueryDataSet
Holds collection of tables resulting from database query.
Constructor Summary | |
---|---|
QueryDataSet(IDatabaseConnection connection)
Create a QueryDataSet by passing in the connection to the database to use. |
Method Summary | |
---|---|
void |
addTable(String tableName)
Adds a table with using 'SELECT * FROM tableName ' as query. |
void |
addTable(String tableName,
String query)
Adds a table and it's associted query to this dataset. |
protected ITableIterator |
createIterator(boolean reversed)
|
String[] |
getTableNames()
Returns names of tables in this dataset in proper sequence. |
Methods inherited from class org.dbunit.dataset.AbstractDataSet |
---|
cloneTables, getTable, getTableMetaData, getTables, iterator, reverseIterator, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QueryDataSet(IDatabaseConnection connection) throws SQLException
connection
- The connection object to the database.
SQLException
- Description of the ExceptionMethod Detail |
---|
public void addTable(String tableName, String query)
tableName
- The name of the tablequery
- The query to retrieve data with for this tablepublic void addTable(String tableName)
tableName
' as query.
tableName
- The name of the tableprotected ITableIterator createIterator(boolean reversed) throws DataSetException
createIterator
in class AbstractDataSet
DataSetException
public String[] getTableNames() throws DataSetException
IDataSet
getTableNames
in interface IDataSet
getTableNames
in class AbstractDataSet
DataSetException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |