public class Specifications<T> extends Object implements Specification<T>, Serializable
Specification instances.| Modifier and Type | Method and Description |
|---|---|
Specifications<T> |
and(Specification<T> other)
ANDs the given
Specification to the current one. |
static <T> Specifications<T> |
not(Specification<T> spec)
Negates the given
Specification. |
Specifications<T> |
or(Specification<T> other)
ORs the given specification to the current one.
|
javax.persistence.criteria.Predicate |
toPredicate(javax.persistence.criteria.Root<T> root,
javax.persistence.criteria.CriteriaQuery<?> query,
javax.persistence.criteria.CriteriaBuilder builder)
Creates a WHERE clause for a query of the referenced entity in form of a
Predicate for the given
Root and CriteriaQuery. |
static <T> Specifications<T> |
where(Specification<T> spec)
Simple static factory method to add some syntactic sugar around a
Specification. |
public static <T> Specifications<T> where(Specification<T> spec)
Specification.T - spec - can be null.public Specifications<T> and(Specification<T> other)
Specification to the current one.T - other - can be null.public Specifications<T> or(Specification<T> other)
T - other - can be null.public static <T> Specifications<T> not(Specification<T> spec)
Specification.T - spec - can be null.public javax.persistence.criteria.Predicate toPredicate(javax.persistence.criteria.Root<T> root, javax.persistence.criteria.CriteriaQuery<?> query, javax.persistence.criteria.CriteriaBuilder builder)
SpecificationPredicate for the given
Root and CriteriaQuery.toPredicate in interface Specification<T>Predicate, may be null.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.