Class XPathDataFactory
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.AbstractDataFactory
-
- org.pentaho.reporting.engine.classic.extensions.datasources.xpath.XPathDataFactory
-
- All Implemented Interfaces:
Serializable
,Cloneable
,org.pentaho.reporting.engine.classic.core.DataFactory
,org.pentaho.reporting.engine.classic.core.DataFactoryDesignTimeSupport
,org.pentaho.reporting.engine.classic.core.DataFactoryMetaProvider
public class XPathDataFactory extends org.pentaho.reporting.engine.classic.core.AbstractDataFactory
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XPathDataFactory.QueryDefinition
-
Constructor Summary
Constructors Constructor Description XPathDataFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XPathDataFactory
clone()
void
close()
Closes the data factory and frees all resources held by this instance.XPathDataFactory
derive()
Returns a copy of the data factory that is not affected by its anchestor and holds no connection to the anchestor anymore.XPathDataFactory.QueryDefinition
getQuery(String name)
String[]
getQueryNames()
String
getXqueryDataFile()
boolean
isQueryExecutable(String query, org.pentaho.reporting.engine.classic.core.DataRow parameters)
Checks whether the query would be executable by this datafactory.TableModel
queryData(String query, org.pentaho.reporting.engine.classic.core.DataRow parameters)
Queries a datasource.void
setQuery(String name, String value, boolean legacyQuery)
void
setXqueryDataFile(String xqueryDataFile)
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.AbstractDataFactory
calculateQueryLimit, calculateQueryTimeOut, cancelRunningQuery, getConfiguration, getContextKey, getDataFactoryContext, getDisplayConnectionName, getLocale, getMetaData, getQueryHash, getReferencedFields, getResourceBundleFactory, getResourceManager, initialize, queryDesignTimeStructure
-
-
-
-
Method Detail
-
getXqueryDataFile
public String getXqueryDataFile()
-
setXqueryDataFile
public void setXqueryDataFile(String xqueryDataFile)
-
getQuery
public XPathDataFactory.QueryDefinition getQuery(String name)
-
getQueryNames
public String[] getQueryNames()
-
queryData
public TableModel queryData(String query, org.pentaho.reporting.engine.classic.core.DataRow parameters) throws org.pentaho.reporting.engine.classic.core.ReportDataFactoryException
Queries a datasource. The string 'query' defines the name of the query. The Parameterset given here may contain more data than actually needed for the query. The parameter-dataset may change between two calls, do not assume anything, and do not hold references to the parameter-dataset or the position of the columns in the dataset.- Parameters:
query
- the query stringparameters
- the parameters for the query- Returns:
- the result of the query as table model.
- Throws:
org.pentaho.reporting.engine.classic.core.ReportDataFactoryException
- if an error occured while performing the query.
-
clone
public XPathDataFactory clone()
- Specified by:
clone
in interfaceorg.pentaho.reporting.engine.classic.core.DataFactory
- Overrides:
clone
in classorg.pentaho.reporting.engine.classic.core.AbstractDataFactory
-
derive
public XPathDataFactory derive()
Returns a copy of the data factory that is not affected by its anchestor and holds no connection to the anchestor anymore. A data-factory will be derived at the beginning of the report processing.- Specified by:
derive
in interfaceorg.pentaho.reporting.engine.classic.core.DataFactory
- Overrides:
derive
in classorg.pentaho.reporting.engine.classic.core.AbstractDataFactory
- Returns:
- a copy of the data factory.
-
close
public void close()
Closes the data factory and frees all resources held by this instance.
-
isQueryExecutable
public boolean isQueryExecutable(String query, org.pentaho.reporting.engine.classic.core.DataRow parameters)
Checks whether the query would be executable by this datafactory. This performs a rough check, not a full query.- Parameters:
query
-parameters
-- Returns:
-
-