Class 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  
      • Nested classes/interfaces inherited from class org.pentaho.reporting.engine.classic.core.AbstractDataFactory

        org.pentaho.reporting.engine.classic.core.AbstractDataFactory.DataRowWrapper
    • Field Summary

      • Fields inherited from interface org.pentaho.reporting.engine.classic.core.DataFactory

        QUERY_LIMIT, QUERY_SORT, QUERY_TIMEOUT
      • Fields inherited from interface org.pentaho.reporting.engine.classic.core.DataFactoryDesignTimeSupport

        DESIGN_TIME
    • Constructor Detail

      • XPathDataFactory

        public XPathDataFactory()
    • Method Detail

      • getXqueryDataFile

        public String getXqueryDataFile()
      • setXqueryDataFile

        public void setXqueryDataFile​(String xqueryDataFile)
      • setQuery

        public void setQuery​(String name,
                             String value,
                             boolean legacyQuery)
      • 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 string
        parameters - 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 interface org.pentaho.reporting.engine.classic.core.DataFactory
        Overrides:
        clone in class org.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 interface org.pentaho.reporting.engine.classic.core.DataFactory
        Overrides:
        derive in class org.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: