Class QueryBuilder

  • Direct Known Subclasses:
    AuditQueryBuilder

    public class QueryBuilder
    extends Object
    Query builder for a query, including ordering, limit and offset.
    Since:
    10.3
    • Field Detail

      • offset

        protected long offset
      • limit

        protected long limit
      • countTotal

        protected boolean countTotal
    • Constructor Detail

      • QueryBuilder

        public QueryBuilder()
      • QueryBuilder

        public QueryBuilder​(QueryBuilder other)
        Copy constructor.
    • Method Detail

      • and

        public QueryBuilder and​(Predicate predicate)
        Adds a new predicate to the list of AND predicates.
      • or

        public QueryBuilder or​(Predicate predicate)
        Adds a new predicate to the list of OR predicates.
      • offset

        public long offset()
      • limit

        public long 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 when false does a best effort but may return -2 when unknown

      • countTotal

        public QueryBuilder countTotal​(boolean countTotal)