public class SQLReportDataFactory extends SimpleSQLReportDataFactory
DESIGN_TIME
QUERY_LIMIT, QUERY_SORT, QUERY_TIMEOUT
Constructor and Description |
---|
SQLReportDataFactory(Connection connection) |
SQLReportDataFactory(ConnectionProvider connectionProvider) |
Modifier and Type | Method and Description |
---|---|
SQLReportDataFactory |
clone() |
String |
getGlobalScript() |
String |
getGlobalScriptLanguage() |
String |
getQuery(String name) |
ArrayList<Object> |
getQueryHash(String queryName,
DataRow parameter) |
String[] |
getQueryNames()
Returns all known query-names.
|
String[] |
getReferencedFields(String query,
DataRow parameter) |
String |
getScript(String name) |
String |
getScriptingLanguage(String name) |
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.
|
void |
remove(String name) |
void |
setGlobalScript(String globalScript) |
void |
setGlobalScriptLanguage(String scriptLanguage) |
void |
setQuery(String name,
String queryString)
Sets a query that uses no scripting for customization.
|
void |
setQuery(String name,
String queryString,
String queryScriptLanguage,
String queryScript) |
cancelRunningQuery, close, getConnectionProvider, getPasswordField, getUserField, isExpandArrayParameterNeeded, setConnectionProvider, setPasswordField, setUserField
derive, getConfiguration, getContextKey, getDataFactoryContext, getDisplayConnectionName, getLocale, getMetaData, getResourceBundleFactory, getResourceManager, queryDesignTimeStructure
public SQLReportDataFactory(Connection connection)
public SQLReportDataFactory(ConnectionProvider connectionProvider)
public boolean isQueryExecutable(String query, DataRow parameters)
isQueryExecutable
in interface DataFactory
isQueryExecutable
in class SimpleSQLReportDataFactory
query
- the query.parameters
- the parameters.public void setQuery(String name, String queryString)
name
- the logical namequeryString
- the SQL string that will be executed.public void setQuery(String name, String queryString, String queryScriptLanguage, String queryScript)
public void remove(String name)
public String getGlobalScriptLanguage()
public void setGlobalScriptLanguage(String scriptLanguage)
public String getGlobalScript()
public void setGlobalScript(String globalScript)
public String[] getQueryNames()
DataFactory
getQueryNames
in interface DataFactory
getQueryNames
in class SimpleSQLReportDataFactory
public void initialize(DataFactoryContext dataFactoryContext) throws ReportDataFactoryException
DataFactory
initialize
in interface DataFactory
initialize
in class AbstractDataFactory
dataFactoryContext
- the current data-factory context, holding the configuration, resource-manager, context-key and
resource-bundle-factory.ReportDataFactoryException
public TableModel queryData(String query, DataRow parameters) throws ReportDataFactoryException
queryData
in interface DataFactory
queryData
in class SimpleSQLReportDataFactory
query
- parameters
- ReportDataFactoryException
- if an error occured while performing the query.public String[] getReferencedFields(String query, DataRow parameter) throws ReportDataFactoryException
getReferencedFields
in interface DataFactoryMetaProvider
getReferencedFields
in class SimpleSQLReportDataFactory
ReportDataFactoryException
public ArrayList<Object> getQueryHash(String queryName, DataRow parameter)
getQueryHash
in interface DataFactoryMetaProvider
getQueryHash
in class SimpleSQLReportDataFactory
public SQLReportDataFactory clone()
clone
in interface DataFactory
clone
in class SimpleSQLReportDataFactory