|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.day.cq.search.impl.result.SearchResultImpl
public class SearchResultImpl
SearchResult exposes the JCR query result in a scripting
friendly way.
| Constructor Summary | |
|---|---|
SearchResultImpl(QueryImpl query,
RowIterator rows,
long executionTime,
long startIndex,
long hitsPerPage)
Creates a new query result. |
|
| Method Summary | |
|---|---|
String |
getExecutionTime()
Returns the execution time in fractions of a second. |
long |
getExecutionTimeMillis()
Returns the execution time in milliseconds. |
Map<String,Facet> |
getFacets()
Returns the facets for this search result. |
String |
getFilteringPredicates()
Returns a string with a list of the predicates that were filtering the result set (as opposed to using XPath, see SearchResult.getQueryStatement()). |
List<Hit> |
getHits()
|
long |
getHitsPerPage()
|
ResultPage |
getNextPage()
|
ResultPage |
getPreviousPage()
|
String |
getQueryStatement()
Returns the actual query string run against the repository, eg. |
List<ResultPage> |
getResultPages()
|
long |
getStartIndex()
|
long |
getTotalMatches()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SearchResultImpl(QueryImpl query,
RowIterator rows,
long executionTime,
long startIndex,
long hitsPerPage)
query - the query object.rows - the rows of the query result.executionTime - the execution time.startIndex - the index where to start displaying the results.hitsPerPage - the number of hits to display on a page (0 for unlimited results on one page).| Method Detail |
|---|
public long getTotalMatches()
getTotalMatches in interface SearchResultpublic long getStartIndex()
getStartIndex in interface SearchResultpublic long getHitsPerPage()
getHitsPerPage in interface SearchResultpublic List<Hit> getHits()
getHits in interface SearchResultHits to display on the result page.public List<ResultPage> getResultPages()
getResultPages in interface SearchResultResultPagees to display the navigation through the
result pages.public ResultPage getPreviousPage()
getPreviousPage in interface SearchResultnull if there is no previous page (i.e. the
current page is the first page).public ResultPage getNextPage()
getNextPage in interface SearchResultnull if there is no next page (i.e. the
current page is the last page).public String getExecutionTime()
getExecutionTime in interface SearchResultpublic long getExecutionTimeMillis()
getExecutionTimeMillis in interface SearchResult
public Map<String,Facet> getFacets()
throws RepositoryException
getFacets in interface SearchResultRepositoryException - if an error occurs while executing the query
or calculating the facets.public String getQueryStatement()
SearchResultSearchResult.getFilteringPredicates().
getQueryStatement in interface SearchResultpublic String getFilteringPredicates()
SearchResultSearchResult.getQueryStatement()).
The returned string is for informational purposes only and might not
fully describe the predicates and their parameters.
getFilteringPredicates in interface SearchResult
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||