Interface AsyncJpaSpecificationExecutor<T>
-
- Type Parameters:
T- The entity type
public interface AsyncJpaSpecificationExecutor<T>Interface representing async version ofJpaSpecificationExecutor.- Since:
- 3.2
- Author:
- Denis Stepanov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.lang.Long>count(PredicateSpecification<T> spec)Returns the number of instances that the givenQuerySpecificationwill return.java.util.concurrent.CompletableFuture<java.lang.Long>count(QuerySpecification<T> spec)Returns the number of instances that the givenQuerySpecificationwill return.java.util.concurrent.CompletableFuture<java.lang.Long>deleteAll(DeleteSpecification<T> spec)Deletes all entities matching the givenDeleteSpecification.java.util.concurrent.CompletableFuture<java.lang.Long>deleteAll(PredicateSpecification<T> spec)Deletes all entities matching the givenPredicateSpecification.<S extends T>
java.util.concurrent.CompletableFuture<? extends java.lang.Iterable<S>>findAll(PredicateSpecification<T> spec)Returns all entities matching the givenPredicateSpecification.java.util.concurrent.CompletableFuture<Page<T>>findAll(PredicateSpecification<T> spec, Pageable pageable)Returns aPageof entities matching the givenPredicateSpecification.<S extends T>
java.util.concurrent.CompletableFuture<? extends java.lang.Iterable<S>>findAll(PredicateSpecification<T> spec, Sort sort)Returns all entities matching the givenQuerySpecificationandSort.<S extends T>
java.util.concurrent.CompletableFuture<? extends java.lang.Iterable<S>>findAll(QuerySpecification<T> spec)Returns all entities matching the givenQuerySpecification.java.util.concurrent.CompletableFuture<Page<T>>findAll(QuerySpecification<T> spec, Pageable pageable)Returns aPageof entities matching the givenQuerySpecification.<S extends T>
java.util.concurrent.CompletableFuture<? extends java.lang.Iterable<S>>findAll(QuerySpecification<T> spec, Sort sort)Returns all entities matching the givenQuerySpecificationandSort.<S extends T>
java.util.concurrent.CompletableFuture<S>findOne(PredicateSpecification<T> spec)Returns a single entity matching the givenPredicateSpecification.<S extends T>
java.util.concurrent.CompletableFuture<S>findOne(QuerySpecification<T> spec)Returns a single entity matching the givenQuerySpecification.java.util.concurrent.CompletableFuture<java.lang.Long>updateAll(UpdateSpecification<T> spec)Updates all entities matching the givenUpdateSpecification.
-
-
-
Method Detail
-
findOne
@NonNull <S extends T> java.util.concurrent.CompletableFuture<S> findOne(@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
@NonNull <S extends T> java.util.concurrent.CompletableFuture<S> findOne(@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
@NonNull <S extends T> java.util.concurrent.CompletableFuture<? extends java.lang.Iterable<S>> findAll(@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
@NonNull <S extends T> java.util.concurrent.CompletableFuture<? extends java.lang.Iterable<S>> findAll(@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
@NonNull java.util.concurrent.CompletableFuture<Page<T>> findAll(@Nullable QuerySpecification<T> spec, Pageable pageable)
Returns aPageof entities matching the givenQuerySpecification.- Parameters:
spec- The query specificationpageable- The pageable object- Returns:
- a page
-
findAll
@NonNull java.util.concurrent.CompletableFuture<Page<T>> findAll(@Nullable PredicateSpecification<T> spec, Pageable pageable)
Returns aPageof entities matching the givenPredicateSpecification.- Parameters:
spec- The query specificationpageable- The pageable object- Returns:
- a page
-
findAll
@NonNull <S extends T> java.util.concurrent.CompletableFuture<? extends java.lang.Iterable<S>> findAll(@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
@NonNull <S extends T> java.util.concurrent.CompletableFuture<? extends java.lang.Iterable<S>> findAll(@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
@NonNull java.util.concurrent.CompletableFuture<java.lang.Long> count(@Nullable QuerySpecification<T> spec)Returns the number of instances that the givenQuerySpecificationwill return.- Parameters:
spec- The query specification- Returns:
- the number of instances.
-
count
@NonNull java.util.concurrent.CompletableFuture<java.lang.Long> count(@Nullable PredicateSpecification<T> spec)Returns the number of instances that the givenQuerySpecificationwill return.- Parameters:
spec- The query specification- Returns:
- the number of instances.
-
deleteAll
@NonNull java.util.concurrent.CompletableFuture<java.lang.Long> deleteAll(@Nullable DeleteSpecification<T> spec)Deletes all entities matching the givenDeleteSpecification.- Parameters:
spec- The delete specification- Returns:
- the number records deleted.
-
deleteAll
@NonNull java.util.concurrent.CompletableFuture<java.lang.Long> deleteAll(@Nullable PredicateSpecification<T> spec)Deletes all entities matching the givenPredicateSpecification.- Parameters:
spec- The delete specification- Returns:
- the number records deleted.
-
updateAll
@NonNull java.util.concurrent.CompletableFuture<java.lang.Long> updateAll(@Nullable UpdateSpecification<T> spec)Updates all entities matching the givenUpdateSpecification.- Parameters:
spec- The update specification- Returns:
- the number records updated.
-
-