public class AsyncFromReactiveAsyncRepositoryOperation extends java.lang.Object implements AsyncRepositoryOperations
AsyncRepositoryOperations
that delegates to a reactive operation.Constructor and Description |
---|
AsyncFromReactiveAsyncRepositoryOperation(ReactiveRepositoryOperations reactiveOperations,
java.util.concurrent.Executor executor) |
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> |
delete(DeleteOperation<T> operation)
Deletes the entity.
|
<T> java.util.concurrent.CompletionStage<java.lang.Number> |
deleteAll(DeleteBatchOperation<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(InsertBatchOperation<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.
|
<T> java.util.concurrent.CompletionStage<java.lang.Iterable<T>> |
updateAll(UpdateBatchOperation<T> operation)
Updates the entities for the given operation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeDelete
public AsyncFromReactiveAsyncRepositoryOperation(ReactiveRepositoryOperations reactiveOperations, java.util.concurrent.Executor executor)
@NonNull public java.util.concurrent.Executor getExecutor()
getExecutor
in interface AsyncRepositoryOperations
@NonNull public <T> java.util.concurrent.CompletionStage<T> findOne(@NonNull java.lang.Class<T> type, @NonNull java.io.Serializable id)
AsyncRepositoryOperations
findOne
in interface AsyncRepositoryOperations
T
- The generic typetype
- The typeid
- The idpublic <T> java.util.concurrent.CompletionStage<java.lang.Boolean> exists(@NonNull PreparedQuery<T,java.lang.Boolean> preparedQuery)
AsyncRepositoryOperations
exists
in interface AsyncRepositoryOperations
T
- The declaring typepreparedQuery
- The query@NonNull public <T,R> java.util.concurrent.CompletionStage<R> findOne(@NonNull PreparedQuery<T,R> preparedQuery)
AsyncRepositoryOperations
findOne
in interface AsyncRepositoryOperations
T
- The generic resultTypeR
- The result typepreparedQuery
- The prepared query@NonNull public <T> java.util.concurrent.CompletionStage<T> findOptional(@NonNull java.lang.Class<T> type, @NonNull java.io.Serializable id)
AsyncRepositoryOperations
findOptional
in interface AsyncRepositoryOperations
T
- The generic typetype
- The typeid
- The id@NonNull public <T,R> java.util.concurrent.CompletionStage<R> findOptional(@NonNull PreparedQuery<T,R> preparedQuery)
AsyncRepositoryOperations
findOptional
in interface AsyncRepositoryOperations
T
- The generic resultTypeR
- The result typepreparedQuery
- The prepared query@NonNull public <T> java.util.concurrent.CompletionStage<java.lang.Iterable<T>> findAll(PagedQuery<T> pagedQuery)
AsyncRepositoryOperations
findAll
in interface AsyncRepositoryOperations
T
- The generic typepagedQuery
- The paged query@NonNull public <T> java.util.concurrent.CompletionStage<java.lang.Long> count(PagedQuery<T> pagedQuery)
AsyncRepositoryOperations
count
in interface AsyncRepositoryOperations
T
- The generic typepagedQuery
- The paged query@NonNull public <T,R> java.util.concurrent.CompletionStage<java.lang.Iterable<R>> findAll(@NonNull PreparedQuery<T,R> preparedQuery)
AsyncRepositoryOperations
findAll
in interface AsyncRepositoryOperations
T
- The entity typeR
- The result typepreparedQuery
- The prepared query@NonNull public <T> java.util.concurrent.CompletionStage<T> persist(@NonNull InsertOperation<T> operation)
AsyncRepositoryOperations
persist
in interface AsyncRepositoryOperations
T
- The generic typeoperation
- The entity operation@NonNull public <T> java.util.concurrent.CompletionStage<T> update(@NonNull UpdateOperation<T> operation)
AsyncRepositoryOperations
update
in interface AsyncRepositoryOperations
T
- The generic typeoperation
- The entity operation@NonNull public <T> java.util.concurrent.CompletionStage<java.lang.Number> delete(@NonNull DeleteOperation<T> operation)
AsyncRepositoryOperations
delete
in interface AsyncRepositoryOperations
T
- The generic typeoperation
- The batch operation@NonNull public <T> java.util.concurrent.CompletionStage<java.lang.Iterable<T>> persistAll(@NonNull InsertBatchOperation<T> operation)
AsyncRepositoryOperations
persistAll
in interface AsyncRepositoryOperations
T
- The generic typeoperation
- The batch operation@NonNull public java.util.concurrent.CompletionStage<java.lang.Number> executeUpdate(@NonNull PreparedQuery<?,java.lang.Number> preparedQuery)
AsyncRepositoryOperations
executeUpdate
in interface AsyncRepositoryOperations
preparedQuery
- The prepared query@NonNull public <T> java.util.concurrent.CompletionStage<java.lang.Number> deleteAll(@NonNull DeleteBatchOperation<T> operation)
AsyncRepositoryOperations
deleteAll
in interface AsyncRepositoryOperations
T
- The generic typeoperation
- The batch operation@NonNull public <R> java.util.concurrent.CompletionStage<Page<R>> findPage(@NonNull PagedQuery<R> pagedQuery)
AsyncRepositoryOperations
findPage
in interface AsyncRepositoryOperations
R
- The entity generic typepagedQuery
- The paged query@NonNull public <T> java.util.concurrent.CompletionStage<java.lang.Iterable<T>> updateAll(@NonNull UpdateBatchOperation<T> operation)
AsyncRepositoryOperations
updateAll
in interface AsyncRepositoryOperations
T
- The generic typeoperation
- The operation