Interface BlockingReactorRepositoryOperations

All Superinterfaces:
io.micronaut.context.ApplicationContextProvider, io.micronaut.core.convert.ConversionServiceProvider, HintsCapableRepository, ReactiveCapableRepository, ReactorReactiveCapableRepository, RepositoryOperations

public interface BlockingReactorRepositoryOperations extends RepositoryOperations, ReactorReactiveCapableRepository
Implementation of RepositoryOperations that blocks every call from ReactorReactiveRepositoryOperations.
Since:
3.3.0
Author:
Denis Stepanov
  • Method Details

    • findOne

      @Nullable default <T> T findOne(@NonNull @NonNull Class<T> type, @NonNull @NonNull Object id)
      Description copied from interface: RepositoryOperations
      Find one by ID.
      Specified by:
      findOne in interface RepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      type - The type
      id - The id
      Returns:
      A result or null
    • findOne

      @Nullable default <T, R> R findOne(@NonNull @NonNull PreparedQuery<T,R> preparedQuery)
      Description copied from interface: RepositoryOperations
      Find one by Query.
      Specified by:
      findOne in interface RepositoryOperations
      Type Parameters:
      T - The generic resultType
      R - The result type
      Parameters:
      preparedQuery - The prepared query
      Returns:
      A result or null
    • findAll

      @NonNull default <T, R> @NonNull Iterable<R> findAll(@NonNull @NonNull PreparedQuery<T,R> preparedQuery)
      Description copied from interface: RepositoryOperations
      Finds all results for the given query.
      Specified by:
      findAll in interface RepositoryOperations
      Type Parameters:
      T - The entity type
      R - The result type
      Parameters:
      preparedQuery - The prepared query
      Returns:
      An iterable result
    • findStream

      @NonNull default <T, R> @NonNull Stream<R> findStream(@NonNull @NonNull PreparedQuery<T,R> preparedQuery)
      Description copied from interface: RepositoryOperations
      Finds all results for the given query.
      Specified by:
      findStream in interface RepositoryOperations
      Type Parameters:
      T - The entity type
      R - The result type
      Parameters:
      preparedQuery - The prepared query
      Returns:
      An iterable result
    • persist

      @NonNull default <T> T persist(@NonNull @NonNull InsertOperation<T> operation)
      Description copied from interface: RepositoryOperations
      Persist the operation returning a possibly new entity.
      Specified by:
      persist in interface RepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      operation - The operation
      Returns:
      The operation
    • update

      @NonNull default <T> T update(@NonNull @NonNull UpdateOperation<T> operation)
      Description copied from interface: RepositoryOperations
      Updates the entity for the given operation.
      Specified by:
      update in interface RepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      operation - The operation
      Returns:
      The operation
    • updateAll

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

      @NonNull default <T> @NonNull Iterable<T> persistAll(@NonNull @NonNull InsertBatchOperation<T> operation)
      Description copied from interface: RepositoryOperations
      Persist all the given entities.
      Specified by:
      persistAll in interface RepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      operation - The operation
      Returns:
      The entities, possibly mutated
    • executeUpdate

      @NonNull default @NonNull Optional<Number> executeUpdate(@NonNull @NonNull PreparedQuery<?,Number> preparedQuery)
      Description copied from interface: RepositoryOperations
      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 RepositoryOperations
      Parameters:
      preparedQuery - The prepared query
      Returns:
      An optional number with the count of the number of records updated
    • executeDelete

      default Optional<Number> executeDelete(@NonNull @NonNull PreparedQuery<?,Number> preparedQuery)
      Description copied from interface: RepositoryOperations
      Executes a delete for the given query and parameter values. If it is possible to return the number of objects deleted, then do so.
      Specified by:
      executeDelete in interface RepositoryOperations
      Parameters:
      preparedQuery - The prepared query
      Returns:
      An optional number with the count of the number of records updated
    • delete

      default <T> int delete(@NonNull @NonNull DeleteOperation<T> operation)
      Description copied from interface: RepositoryOperations
      Deletes the entity.
      Specified by:
      delete in interface RepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      operation - The operation
      Returns:
      The number of entities deleted
    • deleteAll

      default <T> Optional<Number> deleteAll(@NonNull @NonNull DeleteBatchOperation<T> operation)
      Description copied from interface: RepositoryOperations
      Deletes all the entities of the given type.
      Specified by:
      deleteAll in interface RepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      operation - The operation
      Returns:
      The number of entities deleted
    • exists

      default <T> boolean exists(@NonNull @NonNull PreparedQuery<T,Boolean> preparedQuery)
      Description copied from interface: RepositoryOperations
      Execute a query that checks for existence.
      Specified by:
      exists in interface RepositoryOperations
      Type Parameters:
      T - The generic resultType
      Parameters:
      preparedQuery - The prepared query
      Returns:
      A result or null
    • findPage

      default <R> Page<R> findPage(@NonNull @NonNull PagedQuery<R> query)
      Description copied from interface: RepositoryOperations
      Find a page for the given entity and pageable.
      Specified by:
      findPage in interface RepositoryOperations
      Type Parameters:
      R - The entity generic type
      Parameters:
      query - The query
      Returns:
      The page type
    • findAll

      @NonNull default <T> @NonNull Iterable<T> findAll(@NonNull @NonNull PagedQuery<T> query)
      Description copied from interface: RepositoryOperations
      Finds all results for the given query.
      Specified by:
      findAll in interface RepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      query - The root entity
      Returns:
      An iterable result
    • count

      default <T> long count(PagedQuery<T> pagedQuery)
      Description copied from interface: RepositoryOperations
      Counts all results for the given query.
      Specified by:
      count in interface RepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      pagedQuery - The paged query
      Returns:
      An iterable result
    • findStream

      @NonNull default <T> @NonNull Stream<T> findStream(@NonNull @NonNull PagedQuery<T> query)
      Description copied from interface: RepositoryOperations
      Finds a stream for the given arguments.
      Specified by:
      findStream in interface RepositoryOperations
      Type Parameters:
      T - The generic type
      Parameters:
      query - The query
      Returns:
      The stream