Class QueryBuilder
java.lang.Object
org.nuxeo.ecm.core.query.sql.model.QueryBuilder
- Direct Known Subclasses:
AuditQueryBuilder
Query builder for a query, including ordering, limit and offset.
- Since:
- 10.3
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected MultiExpression
protected long
protected long
protected OrderByList
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a new predicate to the list of AND predicates.boolean
May be used by supported APIs to include in the query result a count of total results if there was no limit or offset.countTotal
(boolean countTotal) filter
(MultiExpression filter) Sets the filter.long
limit()
limit
(long limit) long
offset()
offset
(long offset) Adds a new predicate to the list of OR predicates.order
(OrderByExpr order) Adds a new order to this query builder.orders()
We currently only need to handle object instantiated throughOrderByExprs
.orders
(List<OrderByExpr> orders) Sets the orders to use when querying audit.orders
(OrderByExpr order, OrderByExpr... orders) Sets the orders to use when querying audit.Adds a new predicate to the list.toString()
-
Field Details
-
filter
-
orders
-
offset
protected long offset -
limit
protected long limit -
countTotal
protected boolean countTotal
-
-
Constructor Details
-
QueryBuilder
public QueryBuilder() -
QueryBuilder
Copy constructor.
-
-
Method Details
-
predicate
-
and
Adds a new predicate to the list of AND predicates. -
or
Adds a new predicate to the list of OR predicates. -
predicate
Adds a new predicate to the list. -
filter
Sets the filter. -
orders
We currently only need to handle object instantiated throughOrderByExprs
. -
defaultOrder
-
order
Adds a new order to this query builder. -
orders
Sets the orders to use when querying audit. -
orders
Sets the orders to use when querying audit. -
offset
public long offset() -
offset
-
limit
public long limit() -
limit
-
countTotal
public boolean countTotal()May be used by supported APIs to include in the query result a count of total results if there was no limit or offset.If
true
, requests computation of the total size of the underlying list (the size if there was no limit or offset), otherwise whenfalse
does a best effort but may return-2
when unknown -
countTotal
-
toString
-