Interface HstQueryResult
-
public interface HstQueryResult
The result of the execution of the HstQuery.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HippoBeanIterator
getHippoBeans()
This returns a HippoBeanIterator, which is a lazy loading proxy for accessing the beans in the HstQueryResult.int
getSize()
Returns the total number of hits.int
getTotalSize()
Returns the total number of hits.
-
-
-
Method Detail
-
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 usegetTotalSize()
. You can better not set the limit toInteger.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()
-
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 thengetSize()
. Also this method does not imply that every hit needs to be authorized. Hence, this call is much more efficient thangetSize()
.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:
getSize()
-
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 byHippoBeanIterator.nextHippoBean()
orIterator.next()
- Returns:
- a HippoBeanIterator
-
-