Skip to content
Michiel Meeuwissen edited this page Feb 5, 2019 · 12 revisions

JCR-Criteria 2.0

Version 2.0 will be largely compatible with 1.2. Some minor API-changes will be made, which should be easy to fix. Support for SQL2 will be added and be default.

  • Restrictions.eq(<property>, Boolean.FALSE) will not any more implitely match on missing property. Use isFalsy(<property>) in stead.
  • Most methods on Restrictions do not any more accept Object, but only the types that are actually supported. This results in more methods, but it will be less error prone to use. Also we support some more types which can be trivially converted to the ones available in JCR, e.g. types from java.time.
  • Restrictions contains several other new methods. E.g. related to matching on attributes (so it is not necessary to prepend an @ to attribute names)
  • The criteria object can also be created with a fluent builder.
  • nl.vpro.jcr.criteria.query.criterion.MatchMode has been converted to an enum
  • A AdvancedResultImpl can be iterated multiple times. This will result in going back to jackrabbit.
  • AdvancedResult#getItems is not Iterable any more. It is an Iterator. AdvancedResult itself is Iterable.
Clone this wiki locally