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
MostPopularQueriesReport
implements 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 long
getEndDate()
int
getPeriod()
java.util.Iterator
getResult(Session session)
Runs the report and returns a result iterator overObject[]
instances.int
getSize()
long
getStartDate()
void
setEndDate(long end)
void
setPeriod(int period)
void
setSize(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
Long
count (how may times the query was executed)
- Specified by:
getResult
in classReport
- 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.
- 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.
-
-