Package com.atlassian.jira.issue.search
Class SearchResults<T>
java.lang.Object
com.atlassian.jira.issue.search.SearchResults<T>
- All Implemented Interfaces:
Pager
-
Constructor Summary
ConstructorsConstructorDescriptionSearchResults(List<T> resultsInPage, int totalResultCount, int maxResultCount, int startIndex) Construct searchResults using the resultsInPage that should be displayed, and the 'total' number of results.SearchResults(List<T> resultsInPage, int totalResultCount, int maxResultCount, int startIndex, Integer maxResultWindow) Construct searchResults using the resultsInPage that should be displayed, and the 'total' number of results. -
Method Summary
Modifier and TypeMethodDescriptionintgetEnd()intgetMax()The maximum number of issues to retrieve in a single page.intintReturn the 'readable' start (ie 1 instead of 0)List<com.atlassian.jira.issue.search.SearchResults.Page> getPages()intGet the resultsInPage available in this page.intgetStart()intgetTotal()The total number of results matched by the search.<R> SearchResults<R>
-
Constructor Details
-
SearchResults
public SearchResults(List<T> resultsInPage, int totalResultCount, int maxResultCount, int startIndex) Construct searchResults using the resultsInPage that should be displayed, and the 'total' number of results. This is used when we do a stable search and want to return a max of the selected page's length, not the stable search limit.- Parameters:
resultsInPage- A list ofSearchResultsobjectstotalResultCount- The total number of results matched by the searchmaxResultCount- The maximum number of results in the pagestartIndex- The index of the first result in the search
-
SearchResults
public SearchResults(List<T> resultsInPage, int totalResultCount, int maxResultCount, int startIndex, Integer maxResultWindow) Construct searchResults using the resultsInPage that should be displayed, and the 'total' number of results. This is used when we do a stable search and want to return a max of the selected page's length, not the stable search limit.- Parameters:
resultsInPage- A list ofSearchResultsobjectstotalResultCount- The total number of results matched by the searchmaxResultCount- The maximum number of results in the pagestartIndex- The index of the first result in the searchmaxResultWindow- The maximum number of results that can be retrieved from the underlying search engine, or null if unlimited
-
-
Method Details
-
transform
-
getResults
Get the resultsInPage available in this page.- Returns:
- A list of
SearchResultsobjects
-
getStart
public int getStart() -
getEnd
public int getEnd() -
getTotal
public int getTotal()The total number of results matched by the search. The maximum number of results that can be retrieved is limited by themaxResultWindowvalue. -
getMax
public int getMax()The maximum number of issues to retrieve in a single page. -
getMaxResultWindow
- Returns:
- the maximum number of results that can be retrieved from the underlying search engine, or null if unlimited
-
getNextStart
public int getNextStart()- Specified by:
getNextStartin interfacePager
-
getPreviousStart
public int getPreviousStart()- Specified by:
getPreviousStartin interfacePager
-
getNiceStart
public int getNiceStart()Return the 'readable' start (ie 1 instead of 0) -
getPages
-