Interface AsyncJpaSpecificationExecutor<T>
- Type Parameters:
T- The entity type
- All Known Subinterfaces:
BookAsyncRepository,PersonAsyncRepository
public interface AsyncJpaSpecificationExecutor<T>
Interface representing async version of
JpaSpecificationExecutor.- Since:
- 3.2
- Author:
- Denis Stepanov
-
Method Summary
Modifier and TypeMethodDescriptioncount(@Nullable @Nullable PredicateSpecification<T> spec) Returns the number of instances that the givenQuerySpecificationwill return.count(@Nullable @Nullable QuerySpecification<T> spec) Returns the number of instances that the givenQuerySpecificationwill return.deleteAll(@Nullable @Nullable DeleteSpecification<T> spec) Deletes all entities matching the givenDeleteSpecification.deleteAll(@Nullable @Nullable PredicateSpecification<T> spec) Deletes all entities matching the givenPredicateSpecification.exists(@Nullable @Nullable PredicateSpecification<T> spec) Returns whether an instance was found for the givenPredicateSpecification.exists(@Nullable @Nullable QuerySpecification<T> spec) Returns whether an instance was found for the givenQuerySpecification.<S extends T>
CompletableFuture<? extends List<S>> findAll(@Nullable @Nullable PredicateSpecification<T> spec) Returns all entities matching the givenPredicateSpecification.findAll(@Nullable @Nullable PredicateSpecification<T> spec, Pageable pageable) Returns aPageof entities matching the givenPredicateSpecification.<S extends T>
CompletableFuture<? extends List<S>> findAll(@Nullable @Nullable PredicateSpecification<T> spec, Sort sort) Returns all entities matching the givenQuerySpecificationandSort.<S extends T>
CompletableFuture<? extends List<S>> findAll(@Nullable @Nullable QuerySpecification<T> spec) Returns all entities matching the givenQuerySpecification.findAll(@Nullable @Nullable QuerySpecification<T> spec, Pageable pageable) Returns aPageof entities matching the givenQuerySpecification.<S extends T>
CompletableFuture<? extends List<S>> findAll(@Nullable @Nullable QuerySpecification<T> spec, Sort sort) Returns all entities matching the givenQuerySpecificationandSort.<S extends T>
CompletableFuture<S> findOne(@Nullable @Nullable PredicateSpecification<T> spec) Returns a single entity matching the givenPredicateSpecification.<S extends T>
CompletableFuture<S> findOne(@Nullable @Nullable QuerySpecification<T> spec) Returns a single entity matching the givenQuerySpecification.updateAll(@Nullable @Nullable UpdateSpecification<T> spec) Updates all entities matching the givenUpdateSpecification.
-
Method Details
-
findOne
<S extends T> CompletableFuture<S> findOne(@Nullable @Nullable @Nullable QuerySpecification<T> spec) Returns a single entity matching the givenQuerySpecification.- Type Parameters:
S- The entity type- Parameters:
spec- The query specification- Returns:
- optional found result
-
findOne
<S extends T> CompletableFuture<S> findOne(@Nullable @Nullable @Nullable PredicateSpecification<T> spec) Returns a single entity matching the givenPredicateSpecification.- Type Parameters:
S- The result type- Parameters:
spec- The query specification- Returns:
- optional found result
-
findAll
<S extends T> CompletableFuture<? extends List<S>> findAll(@Nullable @Nullable @Nullable QuerySpecification<T> spec) Returns all entities matching the givenQuerySpecification.- Type Parameters:
S- The result type- Parameters:
spec- The query specification- Returns:
- found results
-
findAll
<S extends T> CompletableFuture<? extends List<S>> findAll(@Nullable @Nullable @Nullable PredicateSpecification<T> spec) Returns all entities matching the givenPredicateSpecification.- Type Parameters:
S- The result type- Parameters:
spec- The query specification- Returns:
- found results
-
findAll
CompletableFuture<Page<T>> findAll(@Nullable @Nullable @Nullable QuerySpecification<T> spec, Pageable pageable) Returns aPageof entities matching the givenQuerySpecification.- Parameters:
spec- The query specificationpageable- The pageable object- Returns:
- a page
-
findAll
CompletableFuture<Page<T>> findAll(@Nullable @Nullable @Nullable PredicateSpecification<T> spec, Pageable pageable) Returns aPageof entities matching the givenPredicateSpecification.- Parameters:
spec- The query specificationpageable- The pageable object- Returns:
- a page
-
findAll
<S extends T> CompletableFuture<? extends List<S>> findAll(@Nullable @Nullable @Nullable QuerySpecification<T> spec, Sort sort) Returns all entities matching the givenQuerySpecificationandSort.- Type Parameters:
S- The result type- Parameters:
spec- The query specificationsort- The sort object- Returns:
- found results
-
findAll
<S extends T> CompletableFuture<? extends List<S>> findAll(@Nullable @Nullable @Nullable PredicateSpecification<T> spec, Sort sort) Returns all entities matching the givenQuerySpecificationandSort.- Type Parameters:
S- The result type- Parameters:
spec- The query specificationsort- The sort object- Returns:
- found results
-
count
Returns the number of instances that the givenQuerySpecificationwill return.- Parameters:
spec- The query specification- Returns:
- the number of instances.
-
count
Returns the number of instances that the givenQuerySpecificationwill return.- Parameters:
spec- The query specification- Returns:
- the number of instances.
-
exists
Returns whether an instance was found for the givenQuerySpecification.- Parameters:
spec- The query specification- Returns:
- the number of instances.
- Since:
- 3.8
-
exists
Returns whether an instance was found for the givenPredicateSpecification.- Parameters:
spec- The query specification- Returns:
- the number of instances.
- Since:
- 3.8
-
deleteAll
Deletes all entities matching the givenDeleteSpecification.- Parameters:
spec- The delete specification- Returns:
- the number records deleted.
-
deleteAll
Deletes all entities matching the givenPredicateSpecification.- Parameters:
spec- The delete specification- Returns:
- the number records deleted.
-
updateAll
Updates all entities matching the givenUpdateSpecification.- Parameters:
spec- The update specification- Returns:
- the number records updated.
-