T
- The entity root typepublic interface PredicateSpecification<T>
Modifier and Type | Field and Description |
---|---|
static PredicateSpecification<?> |
ALL
Include all specification.
|
Modifier and Type | Method and Description |
---|---|
default PredicateSpecification<T> |
and(PredicateSpecification<T> other)
ANDs the given
PredicateSpecification to the current one. |
static <T> PredicateSpecification<T> |
not(PredicateSpecification<T> spec)
Negates the given
PredicateSpecification . |
default PredicateSpecification<T> |
or(PredicateSpecification<T> other)
ORs the given
PredicateSpecification to the current one. |
jakarta.persistence.criteria.Predicate |
toPredicate(jakarta.persistence.criteria.Root<T> root,
jakarta.persistence.criteria.CriteriaBuilder criteriaBuilder)
Creates a WHERE clause predicate for the given entity
Root . |
static <T> PredicateSpecification<T> |
where(PredicateSpecification<T> spec)
Simple static factory method to add some syntactic sugar around a
PredicateSpecification . |
static final PredicateSpecification<?> ALL
@NonNull static <T> PredicateSpecification<T> where(@Nullable PredicateSpecification<T> spec)
PredicateSpecification
.T
- the type of the Root
the resulting Specification operates on.spec
- The specification.@NonNull static <T> PredicateSpecification<T> not(@Nullable PredicateSpecification<T> spec)
PredicateSpecification
.T
- the type of the Root
the resulting Specification operates on.spec
- The specification.@NonNull default PredicateSpecification<T> and(@Nullable PredicateSpecification<T> other)
PredicateSpecification
to the current one.other
- The other predicate.@NonNull default PredicateSpecification<T> or(@Nullable PredicateSpecification<T> other)
PredicateSpecification
to the current one.other
- The other predicate.@Nullable jakarta.persistence.criteria.Predicate toPredicate(@NonNull jakarta.persistence.criteria.Root<T> root, @NonNull jakarta.persistence.criteria.CriteriaBuilder criteriaBuilder)
Root
.root
- The entity root.criteriaBuilder
- The criteria builder.Predicate