Class SearchResult

java.lang.Object
com.atlassian.jira.rest.client.api.domain.SearchResult

public class SearchResult extends Object
Represents search results - links to issues matching given filter (JQL query) with basic information supporting the paging through the results.
Since:
v0.2
  • Constructor Details

    • SearchResult

      public SearchResult(int startIndex, int maxResults, int total, Iterable<Issue> issues)
    • SearchResult

      public SearchResult(Iterable<Issue> issues, String nextPageToken)
  • Method Details

    • getStartIndex

      public int getStartIndex()
      Returns:
      0-based start index of the returned issues (e.g. "3" means that 4th, 5th...maxResults issues matching given query have been returned. Available only in DC. Use `nextPageToken` to fetch the next page.
    • getMaxResults

      public int getMaxResults()
      Returns:
      maximum page size (the window to results). Available only in DC.
    • getTotal

      public int getTotal()
      Returns:
      total number of issues (regardless of current maxResults and startIndex) matching given criteria. Query JIRA another time with different startIndex to get subsequent issues. Available only in DC, To get total count use #SearchRestClient.totalCount to fetch the estimated count of the issues for a given JQL.
    • getIssues

      public Iterable<Issue> getIssues()
    • getNextPageToken

      public String getNextPageToken()
      Returns:
      token to get next pages of results. Available only in Cloud version. For DC use #getStartIndex() and #getMaxResults()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object