Interface ReactorReactiveRepositoryOperations
- All Superinterfaces:
io.micronaut.core.convert.ConversionServiceProvider,ReactiveRepositoryOperations
- All Known Subinterfaces:
HibernateReactorRepositoryOperations,ReactorReactiveRepositoryOperations
- All Known Implementing Classes:
DefaultReactiveCosmosRepositoryOperations,DefaultReactiveMongoRepositoryOperations
The version of
ReactiveRepositoryOperations which exposes reactor publisher types.- Since:
- 3.3.0
- Author:
- Denis Stepanov
-
Method Summary
Modifier and TypeMethodDescription<T> reactor.core.publisher.Mono<Long>count(PagedQuery<T> pagedQuery) Counts all results for the given query.<T> reactor.core.publisher.Mono<Number>delete(DeleteOperation<T> operation) Deletes the entity.<T> reactor.core.publisher.Mono<Number>deleteAll(DeleteBatchOperation<T> operation) Deletes all the entities of the given type.reactor.core.publisher.Mono<Number>executeDelete(PreparedQuery<?, Number> preparedQuery) Executes a batch delete for the given query and parameter values.reactor.core.publisher.Mono<Number>executeUpdate(PreparedQuery<?, Number> preparedQuery) Executes an update for the given query and parameter values.<T> reactor.core.publisher.Mono<Boolean>exists(PreparedQuery<T, Boolean> preparedQuery) Check with an record exists for the given query.<T> reactor.core.publisher.Flux<T>findAll(PagedQuery<T> pagedQuery) Finds all results for the given query.<T,R> reactor.core.publisher.Flux<R> findAll(PreparedQuery<T, R> preparedQuery) Finds all results for the given query.<T,R> reactor.core.publisher.Mono<R> findOne(PreparedQuery<T, R> preparedQuery) Find one by Query.<T> reactor.core.publisher.Mono<T>findOne(Class<T> type, Serializable id) Find one by ID.<T,R> reactor.core.publisher.Mono<R> findOptional(PreparedQuery<T, R> preparedQuery) Find one by Query.<T> reactor.core.publisher.Mono<T>findOptional(Class<T> type, Serializable id) Find one by ID.<R> reactor.core.publisher.Mono<Page<R>>findPage(PagedQuery<R> pagedQuery) Find a page for the given entity and pageable.<T> reactor.core.publisher.Mono<T>persist(InsertOperation<T> operation) Persist the entity returning a possibly new entity.<T> reactor.core.publisher.Flux<T>persistAll(InsertBatchOperation<T> operation) Persist all the given entities.<T> reactor.core.publisher.Mono<T>update(UpdateOperation<T> operation) Updates the entity returning a possibly new entity.<T> reactor.core.publisher.Flux<T>updateAll(UpdateBatchOperation<T> operation) Updates the entities for the given operation.Methods inherited from interface io.micronaut.core.convert.ConversionServiceProvider
getConversionService
-
Method Details
-
findOne
@NonNull @SingleResult <T> reactor.core.publisher.Mono<T> findOne(@NonNull Class<T> type, @NonNull Serializable id) Description copied from interface:ReactiveRepositoryOperationsFind one by ID.- Specified by:
findOnein interfaceReactiveRepositoryOperations- Type Parameters:
T- The generic type- Parameters:
type- The typeid- The id- Returns:
- A publisher that emits the result
-
exists
Description copied from interface:ReactiveRepositoryOperationsCheck with an record exists for the given query.- Specified by:
existsin interfaceReactiveRepositoryOperations- Type Parameters:
T- The declaring type- Parameters:
preparedQuery- The query- Returns:
- True if it exists
-
findOne
@SingleResult @NonNull <T,R> reactor.core.publisher.Mono<R> findOne(@NonNull PreparedQuery<T, R> preparedQuery) Description copied from interface:ReactiveRepositoryOperationsFind one by Query.- Specified by:
findOnein interfaceReactiveRepositoryOperations- Type Parameters:
T- The generic resultTypeR- The result type- Parameters:
preparedQuery- The prepared query- Returns:
- A publisher that emits the result
-
findOptional
@NonNull @SingleResult <T> reactor.core.publisher.Mono<T> findOptional(@NonNull Class<T> type, @NonNull Serializable id) Description copied from interface:ReactiveRepositoryOperationsFind one by ID.- Specified by:
findOptionalin interfaceReactiveRepositoryOperations- Type Parameters:
T- The generic type- Parameters:
type- The typeid- The id- Returns:
- A publisher that emits zero or one result
-
findOptional
@SingleResult @NonNull <T,R> reactor.core.publisher.Mono<R> findOptional(@NonNull PreparedQuery<T, R> preparedQuery) Description copied from interface:ReactiveRepositoryOperationsFind one by Query.- Specified by:
findOptionalin interfaceReactiveRepositoryOperations- Type Parameters:
T- The generic resultTypeR- The result type- Parameters:
preparedQuery- The prepared query- Returns:
- A publisher that emits the zero or one result
-
findAll
Description copied from interface:ReactiveRepositoryOperationsFinds all results for the given query.- Specified by:
findAllin interfaceReactiveRepositoryOperations- Type Parameters:
T- The generic type- Parameters:
pagedQuery- The paged query- Returns:
- A publisher that emits the results
-
count
Description copied from interface:ReactiveRepositoryOperationsCounts all results for the given query.- Specified by:
countin interfaceReactiveRepositoryOperations- Type Parameters:
T- The generic type- Parameters:
pagedQuery- The paged query- Returns:
- A publisher that emits the count as a long
-
findAll
Description copied from interface:ReactiveRepositoryOperationsFinds all results for the given query.- Specified by:
findAllin interfaceReactiveRepositoryOperations- Type Parameters:
T- The entity typeR- The result type- Parameters:
preparedQuery- The prepared query- Returns:
- A publisher that emits an iterable with all results
-
persist
@SingleResult @NonNull <T> reactor.core.publisher.Mono<T> persist(@NonNull InsertOperation<T> operation) Description copied from interface:ReactiveRepositoryOperationsPersist the entity returning a possibly new entity.- Specified by:
persistin interfaceReactiveRepositoryOperations- Type Parameters:
T- The generic type- Parameters:
operation- The entity operation- Returns:
- A publisher that emits the entity
-
update
@SingleResult @NonNull <T> reactor.core.publisher.Mono<T> update(@NonNull UpdateOperation<T> operation) Description copied from interface:ReactiveRepositoryOperationsUpdates the entity returning a possibly new entity.- Specified by:
updatein interfaceReactiveRepositoryOperations- Type Parameters:
T- The generic type- Parameters:
operation- The entity operation- Returns:
- A publisher that emits the entity
-
updateAll
Description copied from interface:ReactiveRepositoryOperationsUpdates the entities for the given operation.- Specified by:
updateAllin interfaceReactiveRepositoryOperations- Type Parameters:
T- The generic type- Parameters:
operation- The operation- Returns:
- The updated entities
-
persistAll
Description copied from interface:ReactiveRepositoryOperationsPersist all the given entities.- Specified by:
persistAllin interfaceReactiveRepositoryOperations- Type Parameters:
T- The generic type- Parameters:
operation- The batch operation- Returns:
- The entities, possibly mutated
-
executeUpdate
@NonNull @SingleResult reactor.core.publisher.Mono<Number> executeUpdate(@NonNull PreparedQuery<?, Number> preparedQuery) Description copied from interface:ReactiveRepositoryOperationsExecutes an update for the given query and parameter values. If it is possible to return the number of objects updated, then do so.- Specified by:
executeUpdatein interfaceReactiveRepositoryOperations- Parameters:
preparedQuery- The prepared query- Returns:
- A publisher that emits a boolean true if the update was successful
-
executeDelete
@NonNull @SingleResult reactor.core.publisher.Mono<Number> executeDelete(@NonNull PreparedQuery<?, Number> preparedQuery) Description copied from interface:ReactiveRepositoryOperationsExecutes a batch delete for the given query and parameter values. If it is possible to return the number of objects updated, then do so.- Specified by:
executeDeletein interfaceReactiveRepositoryOperations- Parameters:
preparedQuery- The prepared query- Returns:
- A publisher that emits a boolean true if the update was successful
-
delete
@SingleResult @NonNull <T> reactor.core.publisher.Mono<Number> delete(@NonNull DeleteOperation<T> operation) Description copied from interface:ReactiveRepositoryOperationsDeletes the entity.- Specified by:
deletein interfaceReactiveRepositoryOperations- Type Parameters:
T- The generic type- Parameters:
operation- The batch operation- Returns:
- A publisher that emits the number of entities deleted
-
deleteAll
@SingleResult @NonNull <T> reactor.core.publisher.Mono<Number> deleteAll(@NonNull DeleteBatchOperation<T> operation) Description copied from interface:ReactiveRepositoryOperationsDeletes all the entities of the given type.- Specified by:
deleteAllin interfaceReactiveRepositoryOperations- Type Parameters:
T- The generic type- Parameters:
operation- The batch operation- Returns:
- A publisher that emits the number of entities deleted
-
findPage
@SingleResult @NonNull <R> reactor.core.publisher.Mono<Page<R>> findPage(@NonNull PagedQuery<R> pagedQuery) Description copied from interface:ReactiveRepositoryOperationsFind a page for the given entity and pageable.- Specified by:
findPagein interfaceReactiveRepositoryOperations- Type Parameters:
R- The entity generic type- Parameters:
pagedQuery- The paged query- Returns:
- The page type
-