public class SearchResults extends Object
| Modifier and Type | Field and Description |
|---|---|
int |
itemsPerPage
for paging the results
|
int |
maxItemsToReturn
The maximum number of results returned after the startindex, 0 indicates the default value
(all items)
|
String |
originalQuery
This is a holder for the original query before it is adjusted
|
String |
query
The search query that was performed
|
int |
startIndex
The index (position) of the result item to started on (used for paging)
0 indicates the default value (start at the beginning) |
int |
totalItemsMatched
The total number of items matched by the search
|
| Constructor and Description |
|---|
SearchResults() |
SearchResults(int start,
int max,
int total,
List<SearchResult> results)
use this constructor to build search results manually
|
SearchResults(String query,
int startIndex,
int maxItemsToReturn) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addResult(SearchContent content)
Add results to the total results,
this will not allow adding results beyond the totalItemsMatched (max) number
|
boolean |
addResult(SearchResult searchResult)
Add results to the total results,
this will not allow adding results beyond the maxItemsToReturn (max) number
|
int |
getEndIndex() |
int |
getEndNum() |
int |
getItemsPerPage() |
int |
getMaxItemsToReturn() |
String |
getOriginalQuery() |
int |
getPagesNum() |
int |
getPerPageNum() |
String |
getQuery() |
List<SearchResult> |
getResults() |
int |
getResultsNum() |
int |
getStartIndex() |
int |
getStartNum() |
int |
getTotalItemsMatched() |
int |
getTotalNum() |
void |
setItemsPerPage(int itemsPerPage) |
void |
setOriginalQuery(String originalQuery) |
public String query
public int startIndex
public int maxItemsToReturn
public int totalItemsMatched
public String originalQuery
public int itemsPerPage
public SearchResults()
public SearchResults(String query, int startIndex, int maxItemsToReturn)
public SearchResults(int start,
int max,
int total,
List<SearchResult> results)
public boolean addResult(SearchContent content)
steepleItem - the result to addpublic boolean addResult(SearchResult searchResult)
searchResult - the result to addpublic String getQuery()
public List<SearchResult> getResults()
public int getStartIndex()
public int getEndIndex()
public int getMaxItemsToReturn()
public int getTotalItemsMatched()
public int getStartNum()
public int getEndNum()
public int getResultsNum()
public int getPerPageNum()
public int getPagesNum()
public int getTotalNum()
public void setOriginalQuery(String originalQuery)
public String getOriginalQuery()
public void setItemsPerPage(int itemsPerPage)
public int getItemsPerPage()
Copyright © 2007–2019 Sakai Project. All rights reserved.