Class CmsGallerySearchResultList

All Implemented Interfaces:
Serializable, Cloneable, Iterable<CmsGallerySearchResult>, Collection<CmsGallerySearchResult>, List<CmsGallerySearchResult>, RandomAccess

The search result list for the gallery search index.

Since:
8.0.0
See Also:
  • Constructor Details

    • CmsGallerySearchResultList

      Creates a new result list with a default initial capacity of 100.

    • CmsGallerySearchResultList

      public CmsGallerySearchResultList(int initialCapacity)
      Creates a new result list with the specified initial capacity.

      Parameters:
      initialCapacity - the initial capacity
  • Method Details

    • append

      public void append(CmsGallerySearchResultList moreResults)
      Appends the results from another search result list.

      Parameters:
      moreResults - the second search result list
    • getHitCount

      public int getHitCount()
      Returns the hit count of all results found in the last search.

      Since this list will only contain the result objects for the current display page, the size of the list is usually much less then the hit count of all results found.

      Returns:
      the hit count of all results found in the last search
    • getPageCount

      public int getPageCount()
      Returns the total number of search result pages.

      Returns:
      the total number of search result pages
      See Also:
    • getResultPage

      public int getResultPage()
      Returns the index of the current result page.

      Returns:
      the index of the current result page
      See Also:
    • setHitCount

      public void setHitCount(int hitCount)
      Sets the hit count of all results found in the last search.

      Since this list will only contain the result objects for the current display page, the size of the list is usually much less then the hit count of all results found.

      Parameters:
      hitCount - the hit count to set
    • calculatePages

      public void calculatePages(int pageIndex, int matchesPerPage)
      Calculates the result pages.

      Parameters:
      pageIndex - the index of the current page
      matchesPerPage - the matches per page