T - The entity typepublic interface JpaSpecificationExecutor<T>
Specifications based on the JPA criteria API.
Note: Forked from 'org.springframework.data.jpa.repository.JpaSpecificationExecutor'.| Modifier and Type | Method and Description |
|---|---|
long |
count(Specification<T> spec)
Returns the number of instances that the given
Specification will return. |
java.util.List<T> |
findAll(Specification<T> spec)
Returns all entities matching the given
Specification. |
Page<T> |
findAll(Specification<T> spec,
Pageable pageable)
Returns a
Page of entities matching the given Specification. |
java.util.List<T> |
findAll(Specification<T> spec,
Sort sort)
Returns all entities matching the given
Specification and Sort. |
java.util.Optional<T> |
findOne(Specification<T> spec)
Returns a single entity matching the given
Specification or Optional.empty() if none found. |
java.util.Optional<T> findOne(@Nullable Specification<T> spec)
Specification or Optional.empty() if none found.spec - can be null.java.util.List<T> findAll(@Nullable Specification<T> spec)
Specification.spec - can be null.Page<T> findAll(@Nullable Specification<T> spec, Pageable pageable)
Page of entities matching the given Specification.spec - can be null.pageable - must not be null.java.util.List<T> findAll(@Nullable Specification<T> spec, Sort sort)
Specification and Sort.spec - can be null.sort - must not be null.long count(@Nullable
Specification<T> spec)
Specification will return.spec - the Specification to count instances for. Can be null.