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