Class ExecutorReactiveOperationsSupportingCriteria
java.lang.Object
io.micronaut.data.runtime.operations.ExecutorReactiveOperations
io.micronaut.data.runtime.operations.ExecutorReactiveOperationsSupportingCriteria
- All Implemented Interfaces:
io.micronaut.core.convert.ConversionServiceProvider
,ReactiveCriteriaCapableRepository
,ReactiveCriteriaRepositoryOperations
,ReactiveRepositoryOperations
public class ExecutorReactiveOperationsSupportingCriteria
extends ExecutorReactiveOperations
implements ReactiveCriteriaRepositoryOperations
A variation of
ExecutorReactiveOperations
that supports ReactiveCriteriaRepositoryOperations
.- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorDescriptionExecutorReactiveOperationsSupportingCriteria
(ExecutorAsyncOperationsSupportingCriteria asyncOperations, DataConversionService dataConversionService) -
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<Number>
Executes a delete for the given query and parameter values.org.reactivestreams.Publisher<Boolean>
exists
(jakarta.persistence.criteria.CriteriaQuery<?> query) Exists query.<T> org.reactivestreams.Publisher<T>
findAll
(jakarta.persistence.criteria.CriteriaQuery<T> query) Finds all results for the given query.<T> org.reactivestreams.Publisher<T>
findAll
(jakarta.persistence.criteria.CriteriaQuery<T> query, int offset, int limit) Finds all results for the given query.<R> org.reactivestreams.Publisher<R>
findOne
(jakarta.persistence.criteria.CriteriaQuery<R> query) Find one by Query.jakarta.persistence.criteria.CriteriaBuilder
org.reactivestreams.Publisher<Number>
Executes an update for the given query and parameter values.Methods inherited from class io.micronaut.data.runtime.operations.ExecutorReactiveOperations
count, delete, deleteAll, executeUpdate, exists, findAll, findAll, findOne, findOne, findOptional, findOptional, findPage, fromCompletableFuture, getConversionService, persist, persistAll, update, updateAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.data.operations.reactive.ReactiveCriteriaRepositoryOperations
reactive
Methods inherited from interface io.micronaut.data.operations.reactive.ReactiveRepositoryOperations
execute, executeDelete
-
Constructor Details
-
ExecutorReactiveOperationsSupportingCriteria
public ExecutorReactiveOperationsSupportingCriteria(ExecutorAsyncOperationsSupportingCriteria asyncOperations, DataConversionService dataConversionService)
-
-
Method Details
-
getCriteriaBuilder
public jakarta.persistence.criteria.CriteriaBuilder getCriteriaBuilder()- Specified by:
getCriteriaBuilder
in interfaceReactiveCriteriaRepositoryOperations
- Returns:
- The criteria builder
-
exists
public org.reactivestreams.Publisher<Boolean> exists(jakarta.persistence.criteria.CriteriaQuery<?> query) Description copied from interface:ReactiveCriteriaRepositoryOperations
Exists query.- Specified by:
exists
in interfaceReactiveCriteriaRepositoryOperations
- Parameters:
query
- The query- Returns:
- True if query returns true or any row
-
findOne
public <R> org.reactivestreams.Publisher<R> findOne(jakarta.persistence.criteria.CriteriaQuery<R> query) Description copied from interface:ReactiveCriteriaRepositoryOperations
Find one by Query.- Specified by:
findOne
in interfaceReactiveCriteriaRepositoryOperations
- Type Parameters:
R
- The result type- Parameters:
query
- The query- Returns:
- A single result publisher
-
findAll
public <T> org.reactivestreams.Publisher<T> findAll(jakarta.persistence.criteria.CriteriaQuery<T> query) Description copied from interface:ReactiveCriteriaRepositoryOperations
Finds all results for the given query.- Specified by:
findAll
in interfaceReactiveCriteriaRepositoryOperations
- Type Parameters:
T
- The generic type- Parameters:
query
- The query- Returns:
- All result publisher
-
findAll
public <T> org.reactivestreams.Publisher<T> findAll(jakarta.persistence.criteria.CriteriaQuery<T> query, int offset, int limit) Description copied from interface:ReactiveCriteriaRepositoryOperations
Finds all results for the given query.- Specified by:
findAll
in interfaceReactiveCriteriaRepositoryOperations
- Type Parameters:
T
- The generic type- Parameters:
query
- The queryoffset
- The offsetlimit
- The limit- Returns:
- All result publisher
-
updateAll
public org.reactivestreams.Publisher<Number> updateAll(jakarta.persistence.criteria.CriteriaUpdate<Number> query) Description copied from interface:ReactiveCriteriaRepositoryOperations
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:
updateAll
in interfaceReactiveCriteriaRepositoryOperations
- Parameters:
query
- The prepared query- Returns:
- An optional number with the count of the number of records updated
-
deleteAll
public org.reactivestreams.Publisher<Number> deleteAll(jakarta.persistence.criteria.CriteriaDelete<Number> query) Description copied from interface:ReactiveCriteriaRepositoryOperations
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:
deleteAll
in interfaceReactiveCriteriaRepositoryOperations
- Parameters:
query
- The query- Returns:
- An optional number with the count of the number of records updated
-