Class QueryHistoryReport


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

      Constructors 
      Constructor Description
      QueryHistoryReport​(java.lang.String dataPath, java.lang.String query)
      Creates a new report.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getPeriod()  
      java.util.Iterator getResult​(Session session)
      Runs the report and returns a result iterator over Object[] instances.
      void setPeriod​(int period)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QueryHistoryReport

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

      • getResult

        public java.util.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
        Parameters:
        session - the session giving access to the workspace.
        Returns:
        Iterator over Object results.
        Throws:
        RepositoryException - if an error occurs while reading from the repository.
      • getPeriod

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

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