public class Query extends Object
Query applies a set of Query
Criteria which will be used to retrieve the desired Items from the storage.
The Criteria can be a set of Criteria or a single Criteria.
The Criteria can be manually constructor or the CriteriaBuilder can be used.| Constructor and Description |
|---|
Query()
This constructs a Query object, enabling the Query facilities.
|
Query(Criteria criteria)
This constructs a Query object, enabling the Query facilities.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLimitFilter(LimitFilter filter)
Deprecated.
Use setResultFilter instead.
|
void |
addSorting(SortParameter sortParameter)
Apply sorting parameter to query.
|
com.tridion.meta.Item[] |
executeEntityQuery()
Execute the Broker query.
|
String[] |
executeQuery()
Execute the Broker query.
|
Criteria |
getCriteria()
Retrieves the Criteria applied to this Query.
|
protected QueryResult |
getQueryResult(String... properties)
Executes the actual query.
|
protected QueryService |
getQueryService() |
void |
setCriteria(Criteria theQueryCriteria)
Sets the Criteria to apply to the Query, the CriteriaBuilder can be used
to build a set of Criteria.
|
void |
setResultFilter(ResultFilter filter)
Sets the result filter to the Query.
|
public Query()
public Query(Criteria criteria)
criteria - Criteria for the queryprotected QueryService getQueryService()
@Deprecated public void addLimitFilter(LimitFilter filter)
filter - Filter that will be added to the querypublic void setResultFilter(ResultFilter filter)
filter - The resultFilter to apply to the query.public void addSorting(SortParameter sortParameter)
sortParameter - Sorting that will be applied.public void setCriteria(Criteria theQueryCriteria)
theQueryCriteria - The criteria to apply to the Querypublic Criteria getCriteria()
public String[] executeQuery() throws StorageException
StorageException - If unable to execute the Querypublic com.tridion.meta.Item[] executeEntityQuery()
throws StorageException
StorageException - If unable to execute the Queryprotected QueryResult getQueryResult(String... properties) throws StorageException
StorageException - If unable to execute the QueryCopyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries