|
Spring Data Jpa | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.data.jpa.domain.Specifications<T>
public class Specifications<T>
Helper class to easily combine Specification
instances.
Method Summary | ||
---|---|---|
Specifications<T> |
and(Specification<T> other)
ANDs the given Specification to the current one. |
|
static
|
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
|
where(Specification<T> spec)
Simple static factory method to add some syntactic sugar around a Specification . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> Specifications<T> where(Specification<T> spec)
Specification
.
T
- spec
- must not be null.
public Specifications<T> and(Specification<T> other)
Specification
to the current one.
T
- other
- must not be null.
public Specifications<T> or(Specification<T> other)
T
- other
- must not be null.
public static <T> Specifications<T> not(Specification<T> spec)
Specification
.
T
- spec
- must not be null.
public javax.persistence.criteria.Predicate toPredicate(javax.persistence.criteria.Root<T> root, javax.persistence.criteria.CriteriaQuery<?> query, javax.persistence.criteria.CriteriaBuilder builder)
Specification
Predicate
for the given
Root
and CriteriaQuery
.
toPredicate
in interface Specification<T>
Predicate
, must not be null.
|
Spring Data Jpa | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |