Interface JpaSpecificationExecutor<T>

Type Parameters:
T - The entity type

@Deprecated(forRemoval=true, since="4.9") public interface JpaSpecificationExecutor<T>
Deprecated, for removal: This API element is subject to removal in a future version.
Interface to allow execution of Specifications based on the JPA criteria API. Note: Forked from 'org.springframework.data.jpa.repository.JpaSpecificationExecutor'.
Since:
3.1
Author:
Oliver Gierke, Christoph Strobl
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    count(@Nullable Specification<T> spec)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the number of instances that the given Specification will return.
    findAll(@Nullable Specification<T> spec)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns all entities matching the given Specification.
    findAll(@Nullable Specification<T> spec, Pageable pageable)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a Page of entities matching the given Specification.
    findAll(@Nullable Specification<T> spec, Sort sort)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns all entities matching the given Specification and Sort.
    findOne(@Nullable Specification<T> spec)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a single entity matching the given Specification or Optional.empty() if none found.
  • Method Details

    • findOne

      Optional<T> findOne(@Nullable @Nullable Specification<T> spec)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns a single entity matching the given Specification or Optional.empty() if none found.
      Parameters:
      spec - can be null.
      Returns:
      never null.
    • findAll

      List<T> findAll(@Nullable @Nullable Specification<T> spec)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns all entities matching the given Specification.
      Parameters:
      spec - can be null.
      Returns:
      never null.
    • findAll

      Page<T> findAll(@Nullable @Nullable Specification<T> spec, Pageable pageable)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns a Page of entities matching the given Specification.
      Parameters:
      spec - can be null.
      pageable - must not be null.
      Returns:
      never null.
    • findAll

      List<T> findAll(@Nullable @Nullable Specification<T> spec, Sort sort)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns all entities matching the given Specification and Sort.
      Parameters:
      spec - can be null.
      sort - must not be null.
      Returns:
      never null.
    • count

      long count(@Nullable @Nullable Specification<T> spec)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the number of instances that the given Specification will return.
      Parameters:
      spec - the Specification to count instances for. Can be null.
      Returns:
      the number of instances.