public interface AsyncRepositoryOperations
Modifier and Type | Method and Description |
---|---|
<T> java.util.concurrent.CompletionStage<java.lang.Long> |
count(PagedQuery<T> pagedQuery)
Counts all results for the given query.
|
<T> java.util.concurrent.CompletionStage<java.lang.Number> |
deleteAll(BatchOperation<T> operation)
Deletes all the entities of the given type.
|
java.util.concurrent.CompletionStage<java.lang.Number> |
executeUpdate(PreparedQuery<?,java.lang.Number> preparedQuery)
Executes an update for the given query and parameter values.
|
<T> java.util.concurrent.CompletionStage<java.lang.Boolean> |
exists(PreparedQuery<T,java.lang.Boolean> preparedQuery)
Check with an record exists for the given query.
|
<T> java.util.concurrent.CompletionStage<java.lang.Iterable<T>> |
findAll(PagedQuery<T> pagedQuery)
Finds all results for the given query.
|
<T,R> java.util.concurrent.CompletionStage<java.lang.Iterable<R>> |
findAll(PreparedQuery<T,R> preparedQuery)
Finds all results for the given query.
|
<T> java.util.concurrent.CompletionStage<T> |
findOne(java.lang.Class<T> type,
java.io.Serializable id)
Find one by ID.
|
<T,R> java.util.concurrent.CompletionStage<R> |
findOne(PreparedQuery<T,R> preparedQuery)
Find one by Query.
|
<T> java.util.concurrent.CompletionStage<T> |
findOptional(java.lang.Class<T> type,
java.io.Serializable id)
Find one by ID.
|
<T,R> java.util.concurrent.CompletionStage<R> |
findOptional(PreparedQuery<T,R> preparedQuery)
Find one by Query.
|
<R> java.util.concurrent.CompletionStage<Page<R>> |
findPage(PagedQuery<R> pagedQuery)
Find a page for the given entity and pageable.
|
java.util.concurrent.Executor |
getExecutor() |
<T> java.util.concurrent.CompletionStage<T> |
persist(InsertOperation<T> operation)
Persist the entity returning a possibly new entity.
|
<T> java.util.concurrent.CompletionStage<java.lang.Iterable<T>> |
persistAll(BatchOperation<T> operation)
Persist all the given entities.
|
<T> java.util.concurrent.CompletionStage<T> |
update(UpdateOperation<T> operation)
Updates the entity returning a possibly new entity.
|
@NonNull java.util.concurrent.Executor getExecutor()
@NonNull <T> java.util.concurrent.CompletionStage<T> findOne(@NonNull java.lang.Class<T> type, @NonNull java.io.Serializable id)
T
- The generic typetype
- The typeid
- The idEmptyResultException
- if the result couldn't be retrieved<T> java.util.concurrent.CompletionStage<java.lang.Boolean> exists(@NonNull PreparedQuery<T,java.lang.Boolean> preparedQuery)
T
- The declaring typepreparedQuery
- The query@NonNull <T,R> java.util.concurrent.CompletionStage<R> findOne(@NonNull PreparedQuery<T,R> preparedQuery)
T
- The generic resultTypeR
- The result typepreparedQuery
- The prepared queryEmptyResultException
- if the result couldn't be retrieved@NonNull <T> java.util.concurrent.CompletionStage<T> findOptional(@NonNull java.lang.Class<T> type, @NonNull java.io.Serializable id)
T
- The generic typetype
- The typeid
- The id@NonNull <T,R> java.util.concurrent.CompletionStage<R> findOptional(@NonNull PreparedQuery<T,R> preparedQuery)
T
- The generic resultTypeR
- The result typepreparedQuery
- The prepared query@NonNull <T> java.util.concurrent.CompletionStage<java.lang.Iterable<T>> findAll(PagedQuery<T> pagedQuery)
T
- The generic typepagedQuery
- The paged query@NonNull <T> java.util.concurrent.CompletionStage<java.lang.Long> count(PagedQuery<T> pagedQuery)
T
- The generic typepagedQuery
- The paged query@NonNull <T,R> java.util.concurrent.CompletionStage<java.lang.Iterable<R>> findAll(@NonNull PreparedQuery<T,R> preparedQuery)
T
- The entity typeR
- The result typepreparedQuery
- The prepared query@NonNull <T> java.util.concurrent.CompletionStage<T> persist(@NonNull InsertOperation<T> operation)
T
- The generic typeoperation
- The entity operation@NonNull <T> java.util.concurrent.CompletionStage<T> update(@NonNull UpdateOperation<T> operation)
T
- The generic typeoperation
- The entity operation@NonNull <T> java.util.concurrent.CompletionStage<java.lang.Iterable<T>> persistAll(@NonNull BatchOperation<T> operation)
T
- The generic typeoperation
- The batch operation@NonNull java.util.concurrent.CompletionStage<java.lang.Number> executeUpdate(@NonNull PreparedQuery<?,java.lang.Number> preparedQuery)
preparedQuery
- The prepared query@NonNull <T> java.util.concurrent.CompletionStage<java.lang.Number> deleteAll(@NonNull BatchOperation<T> operation)
T
- The generic typeoperation
- The batch operation@NonNull <R> java.util.concurrent.CompletionStage<Page<R>> findPage(@NonNull PagedQuery<R> pagedQuery)
R
- The entity generic typepagedQuery
- The paged query