Class QueryHistoryReport

  • public class QueryHistoryReport
    extends Report
    QueryHistoryReport implements a report that returns historical data about a given query.
    • Constructor Detail

      • QueryHistoryReport

        public QueryHistoryReport​(String dataPath,
                                  String query)
        Creates a new report.
        dataPath - the location where the query statistics are stored.
        query - the user query.
    • Method Detail

      • getResult

        public Iterator getResult​(Session session)
                           throws RepositoryException
        Runs the report and returns a result iterator over Object[] instances. Returns result rows with the following objects:
        • Path String, which indicates the month
        • Long count (how many times the query was executed)
        Specified by:
        getResult in class Report
        session - the session giving access to the workspace.
        Iterator over Object results.
        RepositoryException - if an error occurs while reading from the repository.
      • getPeriod

        public int getPeriod()
        the report period in number of days.
      • setPeriod

        public void setPeriod​(int period)
        period - the report period in number of days.