Class DefaultSearchResult<T>

  • All Implemented Interfaces:
    SearchResult<T>

    public class DefaultSearchResult<T>
    extends java.lang.Object
    implements SearchResult<T>
    • Method Summary

      Modifier and Type Method Description
      SearchHandler<T> getHandler()
      Gets the search handler that build this result.
      long getPage()
      Gets the page number that the associated result set expresses.
      int getPageSize()
      Gets the maximum size of the page offered by this search result.
      Search getQuery()
      Gets the query associated with this search result.
      java.util.List<T> getResults()
      Gets the objects found on the page this search result expresses.
      long getTotalResults()
      Gets the count of total results found in this result.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultSearchResult

        public DefaultSearchResult​(Search search,
                                   SearchHandler<T> handler,
                                   long totalResults,
                                   int pageSize,
                                   long page,
                                   java.util.List<T> results)
    • Method Detail

      • getQuery

        public Search getQuery()
        Description copied from interface: SearchResult
        Gets the query associated with this search result.
        Specified by:
        getQuery in interface SearchResult<T>
        Returns:
        Search query instance.
      • getTotalResults

        public long getTotalResults()
        Description copied from interface: SearchResult
        Gets the count of total results found in this result.
        Specified by:
        getTotalResults in interface SearchResult<T>
        Returns:
        total result count.
      • getPageSize

        public int getPageSize()
        Description copied from interface: SearchResult
        Gets the maximum size of the page offered by this search result. This is usually the value supplied to maxResults in the SearchHandler.
        Specified by:
        getPageSize in interface SearchResult<T>
        Returns:
        maximum page size.
      • getPage

        public long getPage()
        Description copied from interface: SearchResult
        Gets the page number that the associated result set expresses.
        Specified by:
        getPage in interface SearchResult<T>
        Returns:
        page number.
      • getResults

        public java.util.List<T> getResults()
        Description copied from interface: SearchResult
        Gets the objects found on the page this search result expresses.
        Specified by:
        getResults in interface SearchResult<T>
        Returns:
        objects found in search.