com.atlassian.jira.issue.search
Class SearchResults

java.lang.Object
  extended by com.atlassian.jira.issue.search.SearchResults
All Implemented Interfaces:
IssuePager

@PublicApi
public class SearchResults
extends Object
implements IssuePager


Constructor Summary
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.
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> issues, PagerFilter<Issue> pagerFilter)
          Construct searchResults using a list of issues.
 
Method Summary
 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<com.atlassian.jira.issue.search.SearchResults.Page> getPages()
           
 int getPreviousStart()
           
 int getStart()
           
 int getTotal()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchResults

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

SearchResults

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

SearchResults

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
Method Detail

getIssues

public List<Issue> getIssues()
Get the issues available in this page.

Returns:
A list of Issue objects

getStart

public int getStart()
Specified by:
getStart in interface IssuePager

getEnd

public int getEnd()
Specified by:
getEnd in interface IssuePager

getTotal

public int getTotal()
Specified by:
getTotal in interface IssuePager

getNextStart

public int getNextStart()
Specified by:
getNextStart in interface IssuePager

getPreviousStart

public int getPreviousStart()
Specified by:
getPreviousStart in interface IssuePager

getNiceStart

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


getPages

public List<com.atlassian.jira.issue.search.SearchResults.Page> getPages()
Specified by:
getPages in interface IssuePager


Copyright © 2002-2013 Atlassian. All Rights Reserved.