public interface HstQueryResult
Modifier and Type | Method and 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.
|
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
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
getSize()
HippoBeanIterator getHippoBeans()
HippoBeanIterator.nextHippoBean()
or Iterator.next()
Copyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.