|
|||||||||||
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
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(java.lang.String tableName)
Adds a table with using 'SELECT * FROM tableName ' as query. |
void |
addTable(java.lang.String tableName,
java.lang.String query)
Adds a table and it's associted query to this dataset. |
protected ITableIterator |
createIterator(boolean reversed)
|
java.lang.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 java.sql.SQLException
connection
- The connection object to the database.
java.sql.SQLException
- Description of the ExceptionMethod Detail |
public void addTable(java.lang.String tableName, java.lang.String query)
tableName
- The name of the tablequery
- The query to retrieve data with for this tablepublic void addTable(java.lang.String tableName)
tableName
' as query.
tableName
- The name of the tableprotected ITableIterator createIterator(boolean reversed) throws DataSetException
createIterator
in class AbstractDataSet
DataSetException
public java.lang.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 |