Class PagingResponse<T>

java.lang.Object
org.gbif.api.model.common.paging.PageableBase
org.gbif.api.model.common.paging.PagingResponse<T>
All Implemented Interfaces:
Pageable
Direct Known Subclasses:
FacetedSearchResponse, SearchResponse

public class PagingResponse<T> extends PageableBase
Paging response bean.
  • Constructor Details

  • Method Details

    • getCount

      @Nullable public Long getCount()
      Gets the count of total results of search operation.
    • setCount

      public void setCount(Long count)
      Sets the total count for all results, not only the ones in this response page. The method will not set endOfRecords automatically.
    • getResults

      public List<T> getResults()
      Gets the list of results. The type of element of the result are defined by the parameter class type T.
      Returns:
      the results list.
    • setResults

      public void setResults(List<T> results)
      Sets the list of results for the response. This method will not modify the endOfRecords flag.
    • isEndOfRecords

      public boolean isEndOfRecords()
      Flag indicating whether more records do exist. If the property has never been manually initialised, the flag is determined automatically. If the total count is set it is used to determine the return value. If only the result is given, we consider a result size equal to limit as an indication that there are (potentially at least) more results.
      Returns:
      true if all records have been returned otherwise null.
    • setEndOfRecords

      public void setEndOfRecords(boolean endOfRecords)
      Manually sets the end of records flag. Setting the flag to true or false deactivates the automatic calculation in #isEndOfRecords().
    • equals

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

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

      public String toString()
      Overrides:
      toString in class PageableBase