DEFAULT_LIMIT
Constructor and Description |
---|
HstQueryImpl(javax.jcr.Session session,
ObjectConverter objectConverter,
javax.jcr.Node scope,
IsNodeTypeFilter isNodeTypeFilter) |
HstQueryImpl(javax.jcr.Session session,
ObjectConverter objectConverter,
javax.jcr.Node scope,
NodeTypeFilter nodeTypeFilter) |
Modifier and Type | Method and Description |
---|---|
void |
addOrderByAscending(String fieldNameAttribute)
Order the object found (ascending)
|
void |
addOrderByDescending(String fieldNameAttribute)
Order the object found (descending)
|
void |
addScopes(List<HippoBean> scopes)
add scopes to search in.
|
void |
addScopes(javax.jcr.Node[] scopes)
add scopes to search in.
|
Filter |
createFilter() |
void |
excludeScopes(List<HippoBean> scopes)
add scopes to exclude from search.
|
void |
excludeScopes(javax.jcr.Node[] scopes)
add scopes to exclude from search.
|
HstQueryResult |
execute()
The actual execution of the HstQuery.
|
BaseFilter |
getFilter() |
int |
getLimit()
Returns the limit of the HstQuery.
|
int |
getOffset()
Returns the offset of the HstQuery.
|
String |
getQuery() |
String |
getQueryAsString(boolean skipDefaultOrderBy)
Returns the query as string.
|
void |
setDefaultResolution(org.hippoecm.repository.util.DateTools.Resolution defaultResolution) |
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.
|
void |
setSkipInvalidScopes(boolean skipInvalidScopes)
Whether invalid scopes should be skipped, or if an invalid scope is found (jcr node is null, HippoBean is empty, etc), throw
a QueryException.
|
String |
toString() |
public HstQueryImpl(javax.jcr.Session session, ObjectConverter objectConverter, javax.jcr.Node scope, NodeTypeFilter nodeTypeFilter)
session
- the jcr session. This session can be null
as long as HSTTWO-1600 is not doneobjectConverter
- scope
- the scope to search below. Scope can be null
nodeTypeFilter
- public HstQueryImpl(javax.jcr.Session session, ObjectConverter objectConverter, javax.jcr.Node scope, IsNodeTypeFilter isNodeTypeFilter)
session
- the jcr session. This session can be null
as long as HSTTWO-1600 is not doneobjectConverter
- scope
- the scope to search below. Scope can be null
isNodeTypeFilter
- public void setDefaultResolution(org.hippoecm.repository.util.DateTools.Resolution defaultResolution)
public void addOrderByAscending(String fieldNameAttribute)
HstQuery
addOrderByAscending
in interface HstQuery
fieldNameAttribute
- the name of the field used to sort the search resultpublic void addOrderByDescending(String fieldNameAttribute)
HstQuery
addOrderByDescending
in interface HstQuery
fieldNameAttribute
- the name of the field used to sort the search resultpublic Filter createFilter()
createFilter
in interface HstQuery
public BaseFilter getFilter()
public void setFilter(BaseFilter filter)
public void setLimit(int limit)
HstQuery
public int getLimit()
HstQuery
HstQuery.DEFAULT_LIMIT
public void setOffset(int offset)
HstQuery
-1
which means it is ignored. A negative offset will be ignoredpublic int getOffset()
HstQuery
HstQuery.setOffset(int)
, the offset will be -1
and will be ignoredpublic String getQueryAsString(boolean skipDefaultOrderBy) throws QueryException
HstQuery
skipDefaultOrder
is getQueryAsString
in interface HstQuery
QueryException
- if we cannot build the query stringpublic String getQuery() throws QueryException
QueryException
public HstQueryResult execute() throws QueryException
HstQuery
execute
in interface HstQuery
HstQueryResult
QueryException
public void addScopes(List<HippoBean> scopes)
HstQuery
public void addScopes(javax.jcr.Node[] scopes)
HstQuery
public void setSkipInvalidScopes(boolean skipInvalidScopes)
HstQuery
true
, then still, when all scopes happen to be invalid, a QueryException is thrownsetSkipInvalidScopes
in interface HstQuery
skipInvalidScopes
- is true
, invalid scopes are ignoredpublic void excludeScopes(List<HippoBean> scopes)
HstQuery
excludeScopes
in interface HstQuery
public void excludeScopes(javax.jcr.Node[] scopes)
HstQuery
excludeScopes
in interface HstQuery
Copyright © 2008-2013 Hippo B.V. (http://www.onehippo.com). All Rights Reserved.