Interface Specification<T>
- Type Parameters:
T- The entity type
public interface Specification<T>
A type to represent a specific view on data, heavily inspired by Spring Data's
Specification.- Since:
- 1.2.0
- Author:
- Christian Beikov
-
Method Summary
Modifier and Type Method Description javax.persistence.criteria.PredicatetoPredicate(javax.persistence.criteria.Root<T> root, javax.persistence.criteria.CriteriaQuery<?> query, javax.persistence.criteria.CriteriaBuilder cb)Creates a WHERE clause for a query of the referenced entity in form of aPredicatefor the givenRootandCriteriaQuery.
-
Method Details
-
toPredicate
javax.persistence.criteria.Predicate toPredicate(javax.persistence.criteria.Root<T> root, javax.persistence.criteria.CriteriaQuery<?> query, javax.persistence.criteria.CriteriaBuilder cb)Creates a WHERE clause for a query of the referenced entity in form of aPredicatefor the givenRootandCriteriaQuery.- Parameters:
root- The query rootquery- The criteria query- Returns:
- a
Predicate, may benull
-