Interface ReactorReactiveRepositoryOperations

All Superinterfaces:
io.micronaut.core.convert.ConversionServiceProvider, ReactiveRepositoryOperations
All Known Subinterfaces:
HibernateReactorRepositoryOperations, ReactorReactiveRepositoryOperations
All Known Implementing Classes:
DefaultReactiveCosmosRepositoryOperations, DefaultReactiveMongoRepositoryOperations

public interface ReactorReactiveRepositoryOperations extends ReactiveRepositoryOperations
The version of ReactiveRepositoryOperations which exposes reactor publisher types.
Since:
3.3.0
Author:
Denis Stepanov
  • Method Summary

    Modifier and Type
    Method
    Description
    <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>
    Deletes all the entities of the given type.
    default <R> reactor.core.publisher.Flux<R>
    execute(PreparedQuery<?,R> preparedQuery)
    Executes the given query with parameter values returning a result.
    reactor.core.publisher.Mono<Number>
    Executes a batch delete for the given query and parameter values.
    reactor.core.publisher.Mono<Number>
    Executes an update for the given query and parameter values.
    <T> reactor.core.publisher.Mono<Boolean>
    exists(PreparedQuery<T,Boolean> preparedQuery)
    Check with a 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, Object 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, Object 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>
    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>
    Updates the entities for the given operation.

    Methods inherited from interface io.micronaut.core.convert.ConversionServiceProvider

    getConversionService
  • Method Details

    • findOne

      @SingleResult <T> reactor.core.publisher.Mono<T> findOne(Class<T> type, Object id)
      Description copied from interface: ReactiveRepositoryOperations
      Find one by ID.
      Specified by:
      findOne in interface ReactiveRepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      type - The type
      id - The id
      Returns:
      A publisher that emits the result
    • exists

      @SingleResult <T> reactor.core.publisher.Mono<Boolean> exists(PreparedQuery<T,Boolean> preparedQuery)
      Description copied from interface: ReactiveRepositoryOperations
      Check with a record exists for the given query.
      Specified by:
      exists in interface ReactiveRepositoryOperations
      Type Parameters:
      T - The declaring type
      Parameters:
      preparedQuery - The query
      Returns:
      True if it exists
    • findOne

      @SingleResult <T,R> reactor.core.publisher.Mono<R> findOne(PreparedQuery<T,R> preparedQuery)
      Description copied from interface: ReactiveRepositoryOperations
      Find one by Query.
      Specified by:
      findOne in interface ReactiveRepositoryOperations
      Type Parameters:
      T - The generic resultType
      R - The result type
      Parameters:
      preparedQuery - The prepared query
      Returns:
      A publisher that emits the result
    • findOptional

      @SingleResult <T> reactor.core.publisher.Mono<T> findOptional(Class<T> type, Object id)
      Description copied from interface: ReactiveRepositoryOperations
      Find one by ID.
      Specified by:
      findOptional in interface ReactiveRepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      type - The type
      id - The id
      Returns:
      A publisher that emits zero or one result
    • findOptional

      @SingleResult <T,R> reactor.core.publisher.Mono<R> findOptional(PreparedQuery<T,R> preparedQuery)
      Description copied from interface: ReactiveRepositoryOperations
      Find one by Query.
      Specified by:
      findOptional in interface ReactiveRepositoryOperations
      Type Parameters:
      T - The generic resultType
      R - The result type
      Parameters:
      preparedQuery - The prepared query
      Returns:
      A publisher that emits the zero or one result
    • findAll

      <T> reactor.core.publisher.Flux<T> findAll(PagedQuery<T> pagedQuery)
      Description copied from interface: ReactiveRepositoryOperations
      Finds all results for the given query.
      Specified by:
      findAll in interface ReactiveRepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      pagedQuery - The paged query
      Returns:
      A publisher that emits the results
    • count

      @SingleResult <T> reactor.core.publisher.Mono<Long> count(PagedQuery<T> pagedQuery)
      Description copied from interface: ReactiveRepositoryOperations
      Counts all results for the given query.
      Specified by:
      count in interface ReactiveRepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      pagedQuery - The paged query
      Returns:
      A publisher that emits the count as a long
    • findAll

      <T,R> reactor.core.publisher.Flux<R> findAll(PreparedQuery<T,R> preparedQuery)
      Description copied from interface: ReactiveRepositoryOperations
      Finds all results for the given query.
      Specified by:
      findAll in interface ReactiveRepositoryOperations
      Type Parameters:
      T - The entity type
      R - The result type
      Parameters:
      preparedQuery - The prepared query
      Returns:
      A publisher that emits an iterable with all results
    • persist

      @SingleResult <T> reactor.core.publisher.Mono<T> persist(InsertOperation<T> operation)
      Description copied from interface: ReactiveRepositoryOperations
      Persist the entity returning a possibly new entity.
      Specified by:
      persist in interface ReactiveRepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      operation - The entity operation
      Returns:
      A publisher that emits the entity
    • update

      @SingleResult <T> reactor.core.publisher.Mono<T> update(UpdateOperation<T> operation)
      Description copied from interface: ReactiveRepositoryOperations
      Updates the entity returning a possibly new entity.
      Specified by:
      update in interface ReactiveRepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      operation - The entity operation
      Returns:
      A publisher that emits the entity
    • updateAll

      <T> reactor.core.publisher.Flux<T> updateAll(UpdateBatchOperation<T> operation)
      Description copied from interface: ReactiveRepositoryOperations
      Updates the entities for the given operation.
      Specified by:
      updateAll in interface ReactiveRepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      operation - The operation
      Returns:
      The updated entities
    • persistAll

      <T> reactor.core.publisher.Flux<T> persistAll(InsertBatchOperation<T> operation)
      Description copied from interface: ReactiveRepositoryOperations
      Persist all the given entities.
      Specified by:
      persistAll in interface ReactiveRepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      operation - The batch operation
      Returns:
      The entities, possibly mutated
    • executeUpdate

      @SingleResult reactor.core.publisher.Mono<Number> executeUpdate(PreparedQuery<?,Number> preparedQuery)
      Description copied from interface: ReactiveRepositoryOperations
      Executes 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:
      executeUpdate in interface ReactiveRepositoryOperations
      Parameters:
      preparedQuery - The prepared query
      Returns:
      A publisher that emits a boolean true if the update was successful
    • executeDelete

      @SingleResult reactor.core.publisher.Mono<Number> executeDelete(PreparedQuery<?,Number> preparedQuery)
      Description copied from interface: ReactiveRepositoryOperations
      Executes 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:
      executeDelete in interface ReactiveRepositoryOperations
      Parameters:
      preparedQuery - The prepared query
      Returns:
      A publisher that emits a boolean true if the update was successful
    • execute

      default <R> reactor.core.publisher.Flux<R> execute(PreparedQuery<?,R> preparedQuery)
      Description copied from interface: ReactiveRepositoryOperations
      Executes the given query with parameter values returning a result.
      Specified by:
      execute in interface ReactiveRepositoryOperations
      Type Parameters:
      R - The result type
      Parameters:
      preparedQuery - The prepared query
      Returns:
      A publisher that emits the result
    • delete

      @SingleResult <T> reactor.core.publisher.Mono<Number> delete(DeleteOperation<T> operation)
      Description copied from interface: ReactiveRepositoryOperations
      Deletes the entity.
      Specified by:
      delete in interface ReactiveRepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      operation - The batch operation
      Returns:
      A publisher that emits the number of entities deleted
    • deleteAll

      @SingleResult <T> reactor.core.publisher.Mono<Number> deleteAll(DeleteBatchOperation<T> operation)
      Description copied from interface: ReactiveRepositoryOperations
      Deletes all the entities of the given type.
      Specified by:
      deleteAll in interface ReactiveRepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      operation - The batch operation
      Returns:
      A publisher that emits the number of entities deleted
    • findPage

      @SingleResult <R> reactor.core.publisher.Mono<Page<R>> findPage(PagedQuery<R> pagedQuery)
      Description copied from interface: ReactiveRepositoryOperations
      Find a page for the given entity and pageable.
      Specified by:
      findPage in interface ReactiveRepositoryOperations
      Type Parameters:
      R - The entity generic type
      Parameters:
      pagedQuery - The paged query
      Returns:
      The page type