Class NamedStaticDataFactory

    • Constructor Detail

      • NamedStaticDataFactory

        public NamedStaticDataFactory()
        Defaultconstructor.
    • Method Detail

      • setQuery

        public void setQuery​(String alias,
                             String queryString)
        Adds an query-alias to this factory.
        Parameters:
        alias - the alias
        queryString - the real query string that should be used when the alias is specified as query.
      • derive

        public DataFactory derive()
        Derives the factory. The derived factory does no longer share properties with its parent and changes to either factory will not be reflected in the other factory.
        Specified by:
        derive in interface DataFactory
        Overrides:
        derive in class StaticDataFactory
        Returns:
        the derived factory.
      • 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!

        Specified by:
        queryData in interface DataFactory
        Overrides:
        queryData in class StaticDataFactory
        Parameters:
        query - the alias-name of the query.
        parameters - the set of parameters.
        Returns:
        the tablemodel.
        Throws:
        ReportDataFactoryException - if an error occured while performing the query.
      • getQuery

        public String getQuery​(String name)
        Returns the query for the given alias-name or null, if there is no such alias defined.
        Parameters:
        name - the alias name.
        Returns:
        the real query or null.