public class SimpleSQLReportDataFactory extends AbstractDataFactory
AbstractDataFactory.DataRowWrapper
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.
|
protected String |
computedQuery(String queryName,
DataRow parameters) |
protected Connection |
getConnection(DataRow dataRow) |
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) |
protected boolean |
isExpandArrays() |
boolean |
isQueryExecutable(String query,
DataRow parameters)
Checks whether the query would be executable by this datafactory.
|
protected TableModel |
parametrizeAndQuery(DataRow parameters,
String translatedQuery,
String[] preparedParameterNames) |
TableModel |
queryData(String query,
DataRow parameters)
Queries a datasource.
|
void |
setConnectionProvider(ConnectionProvider connectionProvider) |
void |
setPasswordField(String passwordField) |
void |
setUserField(String userField) |
protected String |
translateQuery(String query) |
calculateQueryLimit, calculateQueryTimeOut, 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)
protected Connection getConnection(DataRow dataRow) throws SQLException
SQLException
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
protected String computedQuery(String queryName, DataRow parameters) throws ReportDataFactoryException
ReportDataFactoryException
public static boolean isExpandArrayParameterNeeded(String query)
protected TableModel parametrizeAndQuery(DataRow parameters, String translatedQuery, String[] preparedParameterNames) throws SQLException
SQLException
protected boolean isExpandArrays()
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
Copyright © 2017 Hitachi Vantara. All rights reserved.