Interface HstQuery
public interface HstQuery
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The default limit that is used for a HstQuery. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addOrderByAscending
(String fieldNameAttribute) Order the object found case sensitive ascendingvoid
addOrderByAscendingCaseInsensitive
(String fieldNameAttribute) Order the object found case insensitive ascendingvoid
addOrderByDescending
(String fieldNameAttribute) Order the object found case sensitive descendingvoid
addOrderByDescendingCaseInsensitive
(String fieldNameAttribute) Order the object found case insensitive descendingvoid
add scopes to search in.void
add scopes to search in.void
excludeScopes
(List<HippoBean> scopes) add scopes to exclude from search.void
excludeScopes
(Node[] scopes) add scopes to exclude from search.execute()
The actual execution of the HstQuery.int
getLimit()
Returns the limit of the HstQuery.int
Returns the offset of the HstQuery.getQueryAsString
(boolean skipDefaultOrderBy) Returns the query as string.void
setFilter
(BaseFilter filter) void
setLimit
(int limit) Sets the limit of search results.void
setOffset
(int offset) Sets the offset to start searching from.
-
Field Details
-
DEFAULT_LIMIT
static final int DEFAULT_LIMITThe default limit that is used for a HstQuery. UsesetLimit(int)
if you need to override this value.- See Also:
-
-
Method Details
-
setFilter
-
getFilter
BaseFilter getFilter() -
createFilter
Filter createFilter()- Returns:
- a new empty Filter
-
setLimit
void setLimit(int limit) Sets the limit of search results. Note that setting this value very high might influence performance negatively- Parameters:
limit
-
-
getQueryAsString
Returns the query as string. WhenskipDefaultOrder
isTRUE, the string representation will only include an 'order by' clause when there is set one explicitly. - Parameters:
skipDefaultOrderBy
-- Returns:
- the query as string
- Throws:
QueryException
- if we cannot build the query string
-
getLimit
int getLimit()Returns the limit of the HstQuery. If no limit is set, it returns the default HstQuery limitDEFAULT_LIMIT
- Returns:
- the limit
-
setOffset
void setOffset(int offset) Sets the offset to start searching from. Default offset is-1
which means it is ignored. A negative offset will be ignored- Parameters:
offset
-
-
getOffset
int getOffset()Returns the offset of the HstQuery. If no offset is set throughsetOffset(int)
, the offset will be-1
and will be ignored- Returns:
- the offset
-
addOrderByAscending
Order the object found case sensitive ascending- Parameters:
fieldNameAttribute
- the name of the field used to sort the search result
-
addOrderByAscendingCaseInsensitive
Order the object found case insensitive ascending- Parameters:
fieldNameAttribute
- the name of the field used to sort the search result
-
addOrderByDescending
Order the object found case sensitive descending- Parameters:
fieldNameAttribute
- the name of the field used to sort the search result
-
addOrderByDescendingCaseInsensitive
Order the object found case insensitive descending- Parameters:
fieldNameAttribute
- the name of the field used to sort the search result
-
addScopes
add scopes to search in. If the exact scope is already added to exclude from the search, it is removed from the excluded list.- Parameters:
scopes
-
-
addScopes
add scopes to search in. If the exact scope is already added to exclude from the search, it is removed from the excluded list.- Parameters:
scopes
-
-
excludeScopes
add scopes to exclude from search. If the exact scope is already added as a scope to search in, it is removed from there- Parameters:
scopes
-
-
excludeScopes
add scopes to exclude from search. If the exact scope is already added as a scope to search in, it is removed from there- Parameters:
scopes
-
-
execute
The actual execution of the HstQuery. The HstQueryResult will never contain one and the same result twice. So, if a result matches the search criteria twice, it is still returned as one hit.- Returns:
HstQueryResult
- Throws:
QueryException
-