public class TableDataFactory extends AbstractDataFactory
DESIGN_TIME
QUERY_LIMIT, QUERY_SORT, QUERY_TIMEOUT
Constructor and Description |
---|
TableDataFactory()
Default Constructor.
|
TableDataFactory(String name,
TableModel tableModel)
Creates a new TableDataFactory and registers the tablemodel with the given name.
|
Modifier and Type | Method and Description |
---|---|
void |
addTable(String name,
TableModel tableModel)
Registers a tablemodel with the given name.
|
TableDataFactory |
clone()
Creates a copy of this data-factory.
|
void |
close()
Closes the data factory.
|
DataFactory |
derive()
Returns a copy of the data factory that is not affected by its anchestor and holds no connection to the anchestor
anymore.
|
String[] |
getQueryNames()
Returns all known query-names.
|
TableModel |
getTable(String name) |
boolean |
isQueryExecutable(String query,
DataRow parameters)
Checks whether the query would be executable by this datafactory.
|
TableModel |
queryData(String query,
DataRow parameters)
Queries a datasource.
|
void |
removeTable(String name)
Removes the table that has been registered by the given name.
|
cancelRunningQuery, getConfiguration, getContextKey, getDataFactoryContext, getDisplayConnectionName, getLocale, getMetaData, getQueryHash, getReferencedFields, getResourceBundleFactory, getResourceManager, initialize, queryDesignTimeStructure
public TableDataFactory()
public TableDataFactory(String name, TableModel tableModel)
name
- the name of the table.tableModel
- the tablemodel.public boolean isQueryExecutable(String query, DataRow parameters)
query
- parameters
- public void addTable(String name, TableModel tableModel)
name
- the name of the table.tableModel
- the tablemodel that should be registered.public void removeTable(String name)
name
- the name of the table to be removed.public TableModel getTable(String name)
public TableModel queryData(String query, DataRow parameters) throws ReportDataFactoryException
query
- the name of the table.parameters
- are ignored for this factory.ReportDataFactoryException
- if an error occured while performing the query.public void close()
public DataFactory derive()
derive
in interface DataFactory
derive
in class AbstractDataFactory
public TableDataFactory clone()
clone
in interface DataFactory
clone
in class AbstractDataFactory
public String[] getQueryNames()
DataFactory