Interface PredicateSpecification<T>

  • Type Parameters:
    T - The entity root type

    public interface PredicateSpecification<T>
    The predicate specification.
    Since:
    3.2
    • Method Detail

      • where

        @NonNull
        static <T> PredicateSpecification<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:
        predicate specification.
      • toPredicate

        @Nullable
        jakarta.persistence.criteria.Predicate toPredicate​(@NonNull
                                                           jakarta.persistence.criteria.Root<T> root,
                                                           @NonNull
                                                           jakarta.persistence.criteria.CriteriaBuilder criteriaBuilder)
        Creates a WHERE clause predicate for the given entity Root.
        Parameters:
        root - The entity root.
        criteriaBuilder - The criteria builder.
        Returns:
        a Predicate