Class StaticDataFactory

    • Constructor Detail

      • StaticDataFactory

        public StaticDataFactory()
        DefaultConstructor.
    • Method Detail

      • isQueryExecutable

        public boolean isQueryExecutable​(String query,
                                         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:
      • queryData

        public TableModel queryData​(String query,
                                    DataRow parameters)
                             throws ReportDataFactoryException
        Queries a datasource. The string 'query' defines the name of the query. The Parameterset given here may contain more data than actually needed.

        The dataset may change between two calls, do not assume anything!

        Parameters:
        query - the method call.
        parameters - the set of parameters.
        Returns:
        the tablemodel from the executed method call, never null.
        Throws:
        ReportDataFactoryException - if an error occured while performing the query.
      • getClassLoader

        protected ClassLoader getClassLoader()
        Returns the current classloader.
        Returns:
        the current classloader.
      • derive

        public DataFactory 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 DataFactory
        Overrides:
        derive in class AbstractDataFactory
        Returns:
        a copy of the data factory.
      • close

        public void close()
        Closes the data factory and frees all resources held by this instance.

        This method is empty.

      • getQueryNames

        public String[] getQueryNames()
        Description copied from interface: DataFactory
        Returns all known query-names. A data-factory may accept more than the query-names returned here.
        Returns:
        the known query names.
      • translateQuery

        public String translateQuery​(String queryName)