public class QueryDataSet extends AbstractDataSet
_orderedTableNameMap
Constructor and Description |
---|
QueryDataSet(IDatabaseConnection connection)
Create a QueryDataSet by passing in the connection to the database to use.
|
QueryDataSet(IDatabaseConnection connection,
boolean caseSensitiveTableNames)
Create a QueryDataSet by passing in the connection to the database to use.
|
Modifier and Type | Method and Description |
---|---|
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 associated query to this dataset.
|
protected ITableIterator |
createIterator(boolean reversed)
Creates an iterator which provides access to all tables of this dataset
|
java.lang.String[] |
getTableNames()
Returns names of tables in this dataset in proper sequence.
|
createTableNameMap, getTable, getTableMetaData, getTables, initialize, isCaseSensitiveTableNames, iterator, reverseIterator, toString
public QueryDataSet(IDatabaseConnection connection)
connection
- The connection object to the database.public QueryDataSet(IDatabaseConnection connection, boolean caseSensitiveTableNames)
connection
- The connection object to the database.caseSensitiveTableNames
- Whether or not this dataset should use case sensitive table namespublic void addTable(java.lang.String tableName, java.lang.String query) throws AmbiguousTableNameException
tableName
- The name of the tablequery
- The query to retrieve data with for this table. Can be null which will select
all data (see addTable(String)
for details)AmbiguousTableNameException
public void addTable(java.lang.String tableName) throws AmbiguousTableNameException
tableName
' as query.tableName
- The name of the tableAmbiguousTableNameException
protected ITableIterator createIterator(boolean reversed) throws DataSetException
AbstractDataSet
createIterator
in class AbstractDataSet
reversed
- Whether the created iterator should be a reversed one or notITableIterator
DataSetException
public java.lang.String[] getTableNames() throws DataSetException
IDataSet
getTableNames
in interface IDataSet
getTableNames
in class AbstractDataSet
DataSetException
Copyright © 2002-2020. All Rights Reserved.