|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hippoecm.hst.content.beans.query.HstQueryImpl
public class HstQueryImpl
Field Summary |
---|
Fields inherited from interface org.hippoecm.hst.content.beans.query.HstQuery |
---|
DEFAULT_LIMIT |
Constructor Summary | |
---|---|
HstQueryImpl(javax.jcr.Session session,
HstCtxWhereClauseComputer hstCtxWhereClauseComputer,
ObjectConverter objectConverter,
javax.jcr.Node scope,
IsNodeTypeFilter isNodeTypeFilter)
|
|
HstQueryImpl(javax.jcr.Session session,
HstCtxWhereClauseComputer hstCtxWhereClauseComputer,
ObjectConverter objectConverter,
javax.jcr.Node scope,
NodeTypeFilter nodeTypeFilter)
|
Method Summary | |
---|---|
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 |
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HstQueryImpl(javax.jcr.Session session, HstCtxWhereClauseComputer hstCtxWhereClauseComputer, ObjectConverter objectConverter, javax.jcr.Node scope, NodeTypeFilter nodeTypeFilter)
session
- the jcr session. This session can be null
as long as HSTTWO-1600 is not donehstCtxWhereClauseComputer
- objectConverter
- scope
- the scope to search below. Scope can be null
nodeTypeFilter
- public HstQueryImpl(javax.jcr.Session session, HstCtxWhereClauseComputer hstCtxWhereClauseComputer, ObjectConverter objectConverter, javax.jcr.Node scope, IsNodeTypeFilter isNodeTypeFilter)
session
- the jcr session. This session can be null
as long as HSTTWO-1600 is not donehstCtxWhereClauseComputer
- objectConverter
- scope
- the scope to search below. Scope can be null
isNodeTypeFilter
- Method Detail |
---|
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()
getFilter
in interface HstQuery
public void setFilter(BaseFilter filter)
setFilter
in interface HstQuery
public void setLimit(int limit)
HstQuery
setLimit
in interface HstQuery
public int getLimit()
HstQuery
HstQuery.DEFAULT_LIMIT
getLimit
in interface HstQuery
public void setOffset(int offset)
HstQuery
-1
which means it is ignored. A negative offset will be ignored
setOffset
in interface HstQuery
public int getOffset()
HstQuery
HstQuery.setOffset(int)
, the offset will be -1
and will be ignored
getOffset
in interface HstQuery
public 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 String toString()
toString
in class Object
public HstQueryResult execute() throws QueryException
HstQuery
execute
in interface HstQuery
HstQueryResult
QueryException
public void addScopes(List<HippoBean> scopes)
HstQuery
addScopes
in interface HstQuery
public void addScopes(javax.jcr.Node[] scopes)
HstQuery
addScopes
in interface HstQuery
public void setSkipInvalidScopes(boolean skipInvalidScopes)
HstQuery
true
, then still, when all scopes happen to be invalid, a QueryException is thrown
setSkipInvalidScopes
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |