Interface SpecificationCustomizer<E>

Type Parameters:
E - entity type targeted by the specification
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SpecificationCustomizer<E>
Callback that can amend or replace the generated filtering Specification before execution.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable org.springframework.data.jpa.domain.Specification<E>
    apply(org.springframework.data.jpa.domain.Specification<E> specification)
    Applies additional specification logic to the generated filter.
  • Method Details

    • apply

      @Nullable org.springframework.data.jpa.domain.Specification<E> apply(org.springframework.data.jpa.domain.Specification<E> specification)
      Applies additional specification logic to the generated filter.
      Parameters:
      specification - generated specification, which may already be unrestricted (Specification.unrestricted())
      Returns:
      specification to execute, or null to remove filtering