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> |
executeDelete(PreparedQuery<?,java.lang.Number> preparedQuery)
Executes a delete batch for the given query and parameter values.
|
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.
|
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)
AsyncRepositoryOperationsfindOne in interface AsyncRepositoryOperationsT - The generic typetype - The typeid - The idpublic <T> java.util.concurrent.CompletionStage<java.lang.Boolean> exists(@NonNull
PreparedQuery<T,java.lang.Boolean> preparedQuery)
AsyncRepositoryOperationsexists in interface AsyncRepositoryOperationsT - The declaring typepreparedQuery - The query@NonNull
public <T,R> java.util.concurrent.CompletionStage<R> findOne(@NonNull
PreparedQuery<T,R> preparedQuery)
AsyncRepositoryOperationsfindOne in interface AsyncRepositoryOperationsT - 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)
AsyncRepositoryOperationsfindOptional in interface AsyncRepositoryOperationsT - The generic typetype - The typeid - The id@NonNull
public <T,R> java.util.concurrent.CompletionStage<R> findOptional(@NonNull
PreparedQuery<T,R> preparedQuery)
AsyncRepositoryOperationsfindOptional in interface AsyncRepositoryOperationsT - The generic resultTypeR - The result typepreparedQuery - The prepared query@NonNull public <T> java.util.concurrent.CompletionStage<java.lang.Iterable<T>> findAll(PagedQuery<T> pagedQuery)
AsyncRepositoryOperationsfindAll in interface AsyncRepositoryOperationsT - The generic typepagedQuery - The paged query@NonNull public <T> java.util.concurrent.CompletionStage<java.lang.Long> count(PagedQuery<T> pagedQuery)
AsyncRepositoryOperationscount in interface AsyncRepositoryOperationsT - The generic typepagedQuery - The paged query@NonNull
public <T,R> java.util.concurrent.CompletionStage<java.lang.Iterable<R>> findAll(@NonNull
PreparedQuery<T,R> preparedQuery)
AsyncRepositoryOperationsfindAll in interface AsyncRepositoryOperationsT - The entity typeR - The result typepreparedQuery - The prepared query@NonNull
public <T> java.util.concurrent.CompletionStage<T> persist(@NonNull
InsertOperation<T> operation)
AsyncRepositoryOperationspersist in interface AsyncRepositoryOperationsT - The generic typeoperation - The entity operation@NonNull
public <T> java.util.concurrent.CompletionStage<T> update(@NonNull
UpdateOperation<T> operation)
AsyncRepositoryOperationsupdate in interface AsyncRepositoryOperationsT - The generic typeoperation - The entity operation@NonNull
public <T> java.util.concurrent.CompletionStage<java.lang.Number> delete(@NonNull
DeleteOperation<T> operation)
AsyncRepositoryOperationsdelete in interface AsyncRepositoryOperationsT - The generic typeoperation - The batch operation@NonNull
public <T> java.util.concurrent.CompletionStage<java.lang.Iterable<T>> persistAll(@NonNull
InsertBatchOperation<T> operation)
AsyncRepositoryOperationspersistAll in interface AsyncRepositoryOperationsT - The generic typeoperation - The batch operation@NonNull
public java.util.concurrent.CompletionStage<java.lang.Number> executeUpdate(@NonNull
PreparedQuery<?,java.lang.Number> preparedQuery)
AsyncRepositoryOperationsexecuteUpdate in interface AsyncRepositoryOperationspreparedQuery - The prepared querypublic java.util.concurrent.CompletionStage<java.lang.Number> executeDelete(PreparedQuery<?,java.lang.Number> preparedQuery)
AsyncRepositoryOperationsexecuteDelete in interface AsyncRepositoryOperationspreparedQuery - The prepared query@NonNull
public <T> java.util.concurrent.CompletionStage<java.lang.Number> deleteAll(@NonNull
DeleteBatchOperation<T> operation)
AsyncRepositoryOperationsdeleteAll in interface AsyncRepositoryOperationsT - The generic typeoperation - The batch operation@NonNull public <R> java.util.concurrent.CompletionStage<Page<R>> findPage(@NonNull PagedQuery<R> pagedQuery)
AsyncRepositoryOperationsfindPage in interface AsyncRepositoryOperationsR - The entity generic typepagedQuery - The paged query@NonNull
public <T> java.util.concurrent.CompletionStage<java.lang.Iterable<T>> updateAll(@NonNull
UpdateBatchOperation<T> operation)
AsyncRepositoryOperationsupdateAll in interface AsyncRepositoryOperationsT - The generic typeoperation - The operation