Interface DeleteSpecification<T>
-
- Type Parameters:
T- The entity root type
public interface DeleteSpecification<T>Criteria delete specification.- Since:
- 3.2
- Author:
- Denis Stepanov
-
-
Field Summary
Fields Modifier and Type Field Description static DeleteSpecification<?>ALLInclude all specification.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default DeleteSpecification<T>and(DeleteSpecification<T> other)ANDs the givenQuerySpecificationto the current one.default DeleteSpecification<T>and(PredicateSpecification<T> other)ANDs the givenPredicateSpecificationto the current one.static <T> DeleteSpecification<T>not(DeleteSpecification<T> spec)Negates the givenDeleteSpecification.default DeleteSpecification<T>or(DeleteSpecification<T> other)ORs the given specification to the current one.default DeleteSpecification<T>or(PredicateSpecification<T> other)ORs the givenPredicateSpecificationto the current one.jakarta.persistence.criteria.PredicatetoPredicate(jakarta.persistence.criteria.Root<T> root, jakarta.persistence.criteria.CriteriaDelete<?> query, jakarta.persistence.criteria.CriteriaBuilder criteriaBuilder)Creates a WHERE clause predicate for the given entityRootand a criteria query.static <T> DeleteSpecification<T>where(DeleteSpecification<T> spec)Simple static factory method to add some syntactic sugar around aDeleteSpecification.static <T> DeleteSpecification<T>where(PredicateSpecification<T> spec)Simple static factory method to add some syntactic sugar around aPredicateSpecification.
-
-
-
Field Detail
-
ALL
static final DeleteSpecification<?> ALL
Include all specification.
-
-
Method Detail
-
not
@NonNull static <T> DeleteSpecification<T> not(@Nullable DeleteSpecification<T> spec)
Negates the givenDeleteSpecification.- Type Parameters:
T- the type of theRootthe resulting Specification operates on.- Parameters:
spec- The specification.- Returns:
- negated specification.
-
where
@NonNull static <T> DeleteSpecification<T> where(@Nullable DeleteSpecification<T> spec)
Simple static factory method to add some syntactic sugar around aDeleteSpecification.- Type Parameters:
T- the type of theRootthe resulting Specification operates on.- Parameters:
spec- The specification.- Returns:
- delete specification.
-
where
@NonNull static <T> DeleteSpecification<T> where(@Nullable PredicateSpecification<T> spec)
Simple static factory method to add some syntactic sugar around aPredicateSpecification.- Type Parameters:
T- the type of theRootthe resulting Specification operates on.- Parameters:
spec- The specification.- Returns:
- delete specification.
-
and
@NonNull default DeleteSpecification<T> and(@Nullable DeleteSpecification<T> other)
ANDs the givenQuerySpecificationto the current one.- Parameters:
other- The other predicate.- Returns:
- The conjunction of the specifications
-
or
@NonNull default DeleteSpecification<T> or(@Nullable DeleteSpecification<T> other)
ORs the given specification to the current one.- Parameters:
other- The other predicate.- Returns:
- The disjunction of the specifications
-
and
@NonNull default DeleteSpecification<T> and(@Nullable PredicateSpecification<T> other)
ANDs the givenPredicateSpecificationto the current one.- Parameters:
other- The other predicate.- Returns:
- The conjunction of the specifications
-
or
@NonNull default DeleteSpecification<T> or(@Nullable PredicateSpecification<T> other)
ORs the givenPredicateSpecificationto the current one.- Parameters:
other- The other predicate.- Returns:
- The disjunction of the specifications
-
toPredicate
@Nullable jakarta.persistence.criteria.Predicate toPredicate(@NonNull jakarta.persistence.criteria.Root<T> root, @NonNull jakarta.persistence.criteria.CriteriaDelete<?> query, @NonNull jakarta.persistence.criteria.CriteriaBuilder criteriaBuilder)Creates a WHERE clause predicate for the given entityRootand a criteria query.- Parameters:
root- The entity rootquery- The criteria querycriteriaBuilder- The criteria builder- Returns:
- a
Predicate
-
-