public class NamedStaticDataFactory extends StaticDataFactory
AbstractDataFactory.DataRowWrapper
DESIGN_TIME
QUERY_LIMIT, QUERY_SORT, QUERY_TIMEOUT
Constructor and Description |
---|
NamedStaticDataFactory()
Defaultconstructor.
|
Modifier and Type | Method and Description |
---|---|
NamedStaticDataFactory |
clone()
Returns a clone of the factory.
|
DataFactory |
derive()
Derives the factory.
|
String |
getQuery(String name)
Returns the query for the given alias-name or null, if there is no such alias defined.
|
String[] |
getQueryNames()
Returns all known alias-names.
|
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 |
setQuery(String alias,
String queryString)
Adds an query-alias to this factory.
|
String |
translateQuery(String queryName) |
close, getClassLoader, getParameterFields
calculateQueryLimit, calculateQueryTimeOut, cancelRunningQuery, getConfiguration, getContextKey, getDataFactoryContext, getDisplayConnectionName, getLocale, getMetaData, getQueryHash, getReferencedFields, getResourceBundleFactory, getResourceManager, initialize, queryDesignTimeStructure
public boolean isQueryExecutable(String query, DataRow parameters)
isQueryExecutable
in interface DataFactory
isQueryExecutable
in class StaticDataFactory
query
- parameters
- public void setQuery(String alias, String queryString)
alias
- the aliasqueryString
- the real query string that should be used when the alias is specified as query.public DataFactory derive()
derive
in interface DataFactory
derive
in class StaticDataFactory
public NamedStaticDataFactory clone()
clone
in interface DataFactory
clone
in class AbstractDataFactory
public TableModel queryData(String query, DataRow parameters) throws ReportDataFactoryException
queryData
in interface DataFactory
queryData
in class StaticDataFactory
query
- the alias-name of the query.parameters
- the set of parameters.ReportDataFactoryException
- if an error occured while performing the query.public String getQuery(String name)
name
- the alias name.public String[] getQueryNames()
getQueryNames
in interface DataFactory
getQueryNames
in class StaticDataFactory
public String translateQuery(String queryName)
translateQuery
in class StaticDataFactory
Copyright © 2002–2017 Pentaho Corporation. All rights reserved.