@PublicApi public class

SearchResults

extends Object
implements IssuePager
java.lang.Object
   ↳ com.atlassian.jira.issue.search.SearchResults

@PublicApi

This class is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Summary

Public Constructors
SearchResults(List<Issue> issues, PagerFilter<Issue> pagerFilter)
Construct searchResults using a list of issues.
SearchResults(List<Issue> issuesInPage, int totalIssueCount, PagerFilter pagerFilter)
Construct searchResults using the issues that should be displayed, and the 'total' number of issues.
SearchResults(List<Issue> issuesInPage, int totalIssueCount, int maxIssueCount, int startIndex)
Construct searchResults using the issues that should be displayed, and the 'total' number of issues.
Public Methods
int getEnd()
List<Issue> getIssues()
Get the issues available in this page.
int getNextStart()
int getNiceStart()
Return the 'readable' start (ie 1 instead of 0)
List<SearchResults.Page> getPages()
int getPreviousStart()
int getStart()
int getTotal()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.web.component.IssuePager

Public Constructors

public SearchResults (List<Issue> issues, PagerFilter<Issue> pagerFilter)

Construct searchResults using a list of issues. The issues returned by getIssues() will be a subset of the issues passed in.

Parameters
issues A list of Issue objects
pagerFilter Representing which issues to limit the results to

public SearchResults (List<Issue> issuesInPage, int totalIssueCount, PagerFilter pagerFilter)

Construct searchResults using the issues that should be displayed, and the 'total' number of issues. This is used when a search does not wish to load the entire list of issues into memory.

Parameters
issuesInPage A list of Issue objects
totalIssueCount The count of the number of issues returned
pagerFilter Representing the users preference for paging

public SearchResults (List<Issue> issuesInPage, int totalIssueCount, int maxIssueCount, int startIndex)

Construct searchResults using the issues that should be displayed, and the 'total' number of issues. 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
issuesInPage A list of Issue objects
totalIssueCount The count of the number of issues returned
maxIssueCount The maximum number of issues to include in the search
startIndex The index of the first issue in the search

Public Methods

public int getEnd ()

public List<Issue> getIssues ()

Get the issues available in this page.

Returns

public int getNextStart ()

public int getNiceStart ()

Return the 'readable' start (ie 1 instead of 0)

public List<SearchResults.Page> getPages ()

public int getPreviousStart ()

public int getStart ()

public int getTotal ()