Interface HstQueryResult


public interface HstQueryResult
The result of the execution of the HstQuery.
  • Method Summary

    Modifier and Type
    Method
    Description
    This returns a HippoBeanIterator, which is a lazy loading proxy for accessing the beans in the HstQueryResult.
    int
    Returns the total number of hits.
    int
    Returns the total number of hits.
  • Method Details

    • getSize

      int getSize()

      Returns the total number of hits. A hit from a HstQuery is always a single hit. If the hit matches the search criteria multiple times, it still results as a single hit.

      Note that when a limit is set on the query, for example through HstQuery.setLimit(int), then this method will never give a higher value then this limit. If you need the total hit number you can use getTotalSize(). You can better not set the limit to Integer.MAX_VALUE to get the actual total hits, as this means all hits need to be authorized. In that case, getTotalSize() if much faster as it does not authorize the hits.

      The getTotalSize() will return the correct authorized size once we have tackled this in the Repository, see HREPTWO-619

      Returns:
      the total number of authorized hits.
      See Also:
    • getTotalSize

      int getTotalSize()

      Returns the total number of hits. This is the total size of hits, even if a HstQuery.setLimit(int) was used that was smaller. This is different then getSize(). Also this method does not imply that every hit needs to be authorized. Hence, this call is much more efficient than getSize().

      The getTotalSize() will return the correct authorized size once we have tackled this in the Repository, see HREPTWO-619

      Returns:
      the total number of authorized hits.
      See Also:
    • getHippoBeans

      HippoBeanIterator getHippoBeans()
      This returns a HippoBeanIterator, which is a lazy loading proxy for accessing the beans in the HstQueryResult. This is really efficient as the beans are only really fetched when being called by HippoBeanIterator.nextHippoBean() or Iterator.next()
      Returns:
      a HippoBeanIterator