public class SimpleSQLReportDataFactory extends AbstractDataFactory
DESIGN_TIME
QUERY_LIMIT, QUERY_SORT, QUERY_TIMEOUT
Constructor and Description |
---|
SimpleSQLReportDataFactory() |
SimpleSQLReportDataFactory(Connection connection) |
SimpleSQLReportDataFactory(ConnectionProvider connectionProvider) |
Modifier and Type | Method and Description |
---|---|
void |
cancelRunningQuery()
Attempts to cancel the query process that is generating the data for this data factory.
|
SimpleSQLReportDataFactory |
clone() |
void |
close()
Closes the data factory and frees all resources held by this instance.
|
ConnectionProvider |
getConnectionProvider() |
String |
getPasswordField() |
ArrayList<Object> |
getQueryHash(String queryName,
DataRow parameter) |
String[] |
getQueryNames()
Returns all known query-names.
|
String[] |
getReferencedFields(String query,
DataRow parameters) |
String |
getUserField() |
static boolean |
isExpandArrayParameterNeeded(String query) |
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 |
setConnectionProvider(ConnectionProvider connectionProvider) |
void |
setPasswordField(String passwordField) |
void |
setUserField(String userField) |
derive, getConfiguration, getContextKey, getDataFactoryContext, getDisplayConnectionName, getLocale, getMetaData, getResourceBundleFactory, getResourceManager, initialize, queryDesignTimeStructure
public SimpleSQLReportDataFactory()
public SimpleSQLReportDataFactory(Connection connection)
public SimpleSQLReportDataFactory(ConnectionProvider connectionProvider)
public String getUserField()
public void setUserField(String userField)
public String getPasswordField()
public void setPasswordField(String passwordField)
public TableModel queryData(String query, DataRow parameters) throws ReportDataFactoryException
query
- parameters
- ReportDataFactoryException
- if an error occured while performing the query.public String[] getReferencedFields(String query, DataRow parameters) throws ReportDataFactoryException
getReferencedFields
in interface DataFactoryMetaProvider
getReferencedFields
in class AbstractDataFactory
ReportDataFactoryException
public static boolean isExpandArrayParameterNeeded(String query)
public void cancelRunningQuery()
DataFactory
cancelRunningQuery
in interface DataFactory
cancelRunningQuery
in class AbstractDataFactory
public void close()
DataFactory
public SimpleSQLReportDataFactory clone()
clone
in interface DataFactory
clone
in class AbstractDataFactory
public void setConnectionProvider(ConnectionProvider connectionProvider)
public ConnectionProvider getConnectionProvider()
public boolean isQueryExecutable(String query, DataRow parameters)
DataFactory
query
- the query, never null.parameters
- the parameters, never null.public String[] getQueryNames()
DataFactory
public ArrayList<Object> getQueryHash(String queryName, DataRow parameter)
getQueryHash
in interface DataFactoryMetaProvider
getQueryHash
in class AbstractDataFactory