Package com.day.crx.statistics.query
Class MostPopularQueriesReport
- java.lang.Object
-
- com.day.crx.statistics.Report
-
- com.day.crx.statistics.query.MostPopularQueriesReport
-
public class MostPopularQueriesReport extends Report
MostPopularQueriesReportimplements a report that returns the most popular queries in a given period.
-
-
Constructor Summary
Constructors Constructor Description MostPopularQueriesReport(java.lang.String dataPath)Creates a newMostPopularQueriesReport.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetEndDate()intgetPeriod()java.util.IteratorgetResult(Session session)Runs the report and returns a result iterator overObject[]instances.intgetSize()longgetStartDate()voidsetEndDate(long end)voidsetPeriod(int period)voidsetSize(int size)
-
-
-
Constructor Detail
-
MostPopularQueriesReport
public MostPopularQueriesReport(java.lang.String dataPath)
Creates a newMostPopularQueriesReport.- Parameters:
dataPath- the path where the query statistics are stored.
-
-
Method Detail
-
getResult
public java.util.Iterator getResult(Session session) throws RepositoryException
Runs the report and returns a result iterator overObject[]instances. Returns result rows with the following objects:- Query
String Longcount (how may times the query was executed)
- Specified by:
getResultin classReport- Parameters:
session- the session giving access to the workspace.- Returns:
- Iterator over
Objectresults. - Throws:
RepositoryException- if an error occurs while reading from the repository.
- Query
-
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.
-
-