Class MostPopularQueriesReport

java.lang.Object
com.day.crx.statistics.Report
com.day.crx.statistics.query.MostPopularQueriesReport

public class MostPopularQueriesReport extends Report
MostPopularQueriesReport implements a report that returns the most popular queries in a given period.
  • Constructor Details

    • MostPopularQueriesReport

      public MostPopularQueriesReport(String dataPath)
      Parameters:
      dataPath - the path where the query statistics are stored.
  • Method Details

    • 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:
      • Query String
      • Long count (how may 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.
    • getSize

      public int getSize()
      Returns:
      the maximum number of queries to return.
    • setSize

      public void setSize(int size)
      Parameters:
      size - the maximum number of queries to return.
    • getStartDate

      public long getStartDate()
      Returns:
      the start date of the report period (inclusive).
    • setEndDate

      public void setEndDate(long end)
      Parameters:
      end - the end date of the report period (inclusive).
    • getEndDate

      public long getEndDate()
      Returns:
      the end date of the report period (inclusive).
    • 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.