Interface DeleteSpecification<T>

  • Type Parameters:
    T - The entity root type

    public interface DeleteSpecification<T>
    Criteria delete specification.
    Since:
    3.2
    • Method Detail

      • not

        @NonNull
        static <T> DeleteSpecification<T> not​(@Nullable
                                              DeleteSpecification<T> spec)
        Negates the given DeleteSpecification.
        Type Parameters:
        T - the type of the Root the 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 a DeleteSpecification.
        Type Parameters:
        T - the type of the Root the 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 a PredicateSpecification.
        Type Parameters:
        T - the type of the Root the resulting Specification operates on.
        Parameters:
        spec - The specification.
        Returns:
        delete specification.
      • 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
      • 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 entity Root and a criteria query.
        Parameters:
        root - The entity root
        query - The criteria query
        criteriaBuilder - The criteria builder
        Returns:
        a Predicate