public class Between<T> extends PathSpecification<T>
Filters with path between arg1 and arg2 where-clause.
Supports multiple field types: strings, numbers, booleans, enums, dates.
Field types must be Comparable (e.g, implement the Comparable interface); this is a JPA constraint.
NOTE: comparisons are dependent on the underlying database.
Comparisons of floats and doubles (especially floats) may be incorrect due to precision loss.
Comparisons of booleans may be dependent on the underlying database representation.
Comparisons of enums will be of their ordinal or string representations, depending on what you specified to JPA,
e.g., @Enumerated(EnumType.STRING), @Enumerated(EnumType.ORDINAL) or the default (@Enumerated(EnumType.ORDINAL))
path| Constructor and Description |
|---|
Between(QueryContext queryContext,
String path,
String[] args,
Converter converter) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
hashCode() |
javax.persistence.criteria.Predicate |
toPredicate(javax.persistence.criteria.Root<T> root,
javax.persistence.criteria.CriteriaQuery<?> query,
javax.persistence.criteria.CriteriaBuilder criteriaBuilder) |
String |
toString() |
pathpublic Between(QueryContext queryContext, String path, String[] args, Converter converter)
public javax.persistence.criteria.Predicate toPredicate(javax.persistence.criteria.Root<T> root, javax.persistence.criteria.CriteriaQuery<?> query, javax.persistence.criteria.CriteriaBuilder criteriaBuilder)
public boolean equals(Object o)
equals in class PathSpecification<T>public int hashCode()
hashCode in class PathSpecification<T>Copyright © 2014–2020. All rights reserved.