|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SimpleSQLReportDataFactory
public class SimpleSQLReportDataFactory
Field Summary |
---|
Fields inherited from interface org.pentaho.reporting.engine.classic.core.DataFactory |
---|
QUERY_LIMIT, QUERY_TIMEOUT |
Constructor Summary | |
---|---|
SimpleSQLReportDataFactory(Connection connection)
|
|
SimpleSQLReportDataFactory(ConnectionProvider connectionProvider)
|
Method Summary | |
---|---|
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. |
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()
|
void |
initialize(org.pentaho.reporting.libraries.base.config.Configuration configuration,
org.pentaho.reporting.libraries.resourceloader.ResourceManager resourceManager,
org.pentaho.reporting.libraries.resourceloader.ResourceKey contextKey,
ResourceBundleFactory resourceBundleFactory)
Initializes the data factory and provides new context information. |
static boolean |
isExpandArrayParameterNeeded(String query)
|
boolean |
isLabelMapping()
|
boolean |
isQueryExecutable(String query,
DataRow parameters)
Checks whether the query would be executable by this datafactory. |
void |
open()
Opens the data factory. |
TableModel |
queryData(String query,
DataRow parameters)
Queries a datasource. |
void |
setConnectionProvider(ConnectionProvider connectionProvider)
|
void |
setLabelMapping(boolean labelMapping)
|
void |
setPasswordField(String passwordField)
|
void |
setUserField(String userField)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleSQLReportDataFactory(Connection connection)
public SimpleSQLReportDataFactory(ConnectionProvider connectionProvider)
Method Detail |
---|
public void initialize(org.pentaho.reporting.libraries.base.config.Configuration configuration, org.pentaho.reporting.libraries.resourceloader.ResourceManager resourceManager, org.pentaho.reporting.libraries.resourceloader.ResourceKey contextKey, ResourceBundleFactory resourceBundleFactory) throws ReportDataFactoryException
initialize
in interface DataFactory
configuration
- the current report configuration.resourceManager
- the report's resource manager.contextKey
- the report's context key to access resources relative to the report location.resourceBundleFactory
- the report's resource-bundle factory to access localization information.
ReportDataFactoryException
public boolean isLabelMapping()
public void setLabelMapping(boolean labelMapping)
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
queryData
in interface DataFactory
query
- parameters
-
ReportDataFactoryException
- if an error occured while performing the query.public String[] getReferencedFields(String query, DataRow parameters) throws ReportDataFactoryException
ReportDataFactoryException
public static boolean isExpandArrayParameterNeeded(String query)
public void cancelRunningQuery()
DataFactory
cancelRunningQuery
in interface DataFactory
public void open() throws ReportDataFactoryException
DataFactory
open
in interface DataFactory
ReportDataFactoryException
- if an error occured while opening the datafactory resources.public void close()
DataFactory
close
in interface DataFactory
public DataFactory derive()
derive
in interface DataFactory
public Object clone()
clone
in interface DataFactory
clone
in class Object
public void setConnectionProvider(ConnectionProvider connectionProvider)
public ConnectionProvider getConnectionProvider()
public boolean isQueryExecutable(String query, DataRow parameters)
isQueryExecutable
in interface DataFactory
query
- parameters
-
public String[] getQueryNames()
DataFactory
getQueryNames
in interface DataFactory
public ArrayList<Object> getQueryHash(String queryName, DataRow parameter)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |