public interface DataFactory extends Serializable, Cloneable
.util.CloseableTableModel
the tablemodel must remain open until the
DataFactory remains open. The TableModel should not be disposed until the data-factory has been closed.Modifier and Type | Field and Description |
---|---|
static String |
QUERY_LIMIT
An internal query parameter that holds the maximum number of rows a query should return.
|
static String |
QUERY_SORT |
static String |
QUERY_TIMEOUT
An internal query parameter that holds the query timeout value.
|
Modifier and Type | Method and Description |
---|---|
void |
cancelRunningQuery()
Attempts to cancel the query process that is generating the data for this data factory.
|
Object |
clone() |
void |
close()
Closes the data factory and frees all resources held by this instance.
|
DataFactory |
derive()
Returns a copy of the data factory that is not affected by its anchestor and holds no connection to the anchestor
anymore.
|
DataFactoryMetaData |
getMetaData() |
String[] |
getQueryNames()
Returns all known query-names.
|
void |
initialize(DataFactoryContext dataFactoryContext)
Initializes the data factory and provides new context information.
|
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.
|
static final String QUERY_LIMIT
static final String QUERY_TIMEOUT
static final String QUERY_SORT
TableModel queryData(String query, DataRow parameters) throws ReportDataFactoryException
query
- the query string, never null.parameters
- the parameters for the query, never null.ReportDataFactoryException
- if an error occured while performing the query.DataFactory derive()
void close()
boolean isQueryExecutable(String query, DataRow parameters)
query
- the query, never null.parameters
- the parameters, never null.String[] getQueryNames()
void cancelRunningQuery()
void initialize(DataFactoryContext dataFactoryContext) throws ReportDataFactoryException
dataFactoryContext
- the current data-factory context, holding the configuration, resource-manager, context-key and
resource-bundle-factory.ReportDataFactoryException
Object clone()
DataFactoryMetaData getMetaData()