Class ExecutorAsyncOperationsSupportingCriteria
java.lang.Object
io.micronaut.data.runtime.operations.ExecutorAsyncOperations
io.micronaut.data.runtime.operations.ExecutorAsyncOperationsSupportingCriteria
- All Implemented Interfaces:
AsyncCriteriaCapableRepository
,AsyncCriteriaRepositoryOperations
,AsyncRepositoryOperations
@Internal
public final class ExecutorAsyncOperationsSupportingCriteria
extends ExecutorAsyncOperations
implements AsyncCriteriaRepositoryOperations
A variation of
ExecutorAsyncOperations
that supports AsyncCriteriaRepositoryOperations
.- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorDescriptionExecutorAsyncOperationsSupportingCriteria
(RepositoryOperations operations, CriteriaRepositoryOperations criteriaRepositoryOperations, Executor executor) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionExecutes delete for the given query and parameter values.exists
(jakarta.persistence.criteria.CriteriaQuery<?> query) Exists query.<T> CompletionStage<List<T>>
findAll
(jakarta.persistence.criteria.CriteriaQuery<T> query) Finds all results for the given query.<T> CompletionStage<List<T>>
findAll
(jakarta.persistence.criteria.CriteriaQuery<T> query, int offset, int limit) Finds all results for the given query.<R> CompletionStage<R>
findOne
(jakarta.persistence.criteria.CriteriaQuery<R> query) Find one by Query.jakarta.persistence.criteria.CriteriaBuilder
Executes an update for the given query and parameter values.Methods inherited from class io.micronaut.data.runtime.operations.ExecutorAsyncOperations
count, delete, deleteAll, executeDelete, executeUpdate, exists, findAll, findAll, findOne, findOne, findOptional, findOptional, findPage, getExecutor, 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.async.AsyncCriteriaRepositoryOperations
async
Methods inherited from interface io.micronaut.data.operations.async.AsyncRepositoryOperations
execute
-
Constructor Details
-
ExecutorAsyncOperationsSupportingCriteria
public ExecutorAsyncOperationsSupportingCriteria(RepositoryOperations operations, CriteriaRepositoryOperations criteriaRepositoryOperations, Executor executor) Default constructor.- Parameters:
operations
- The target operationscriteriaRepositoryOperations
- The criteria operationsexecutor
- The executor to use.
-
-
Method Details
-
getCriteriaBuilder
public jakarta.persistence.criteria.CriteriaBuilder getCriteriaBuilder()- Specified by:
getCriteriaBuilder
in interfaceAsyncCriteriaRepositoryOperations
- Returns:
- The criteria builder
-
exists
Description copied from interface:AsyncCriteriaRepositoryOperations
Exists query.- Specified by:
exists
in interfaceAsyncCriteriaRepositoryOperations
- Parameters:
query
- The query- Returns:
- True if query returns true or any row
-
findOne
Description copied from interface:AsyncCriteriaRepositoryOperations
Find one by Query.- Specified by:
findOne
in interfaceAsyncCriteriaRepositoryOperations
- Type Parameters:
R
- The result type- Parameters:
query
- The query- Returns:
- A result or null
-
findAll
Description copied from interface:AsyncCriteriaRepositoryOperations
Finds all results for the given query.- Specified by:
findAll
in interfaceAsyncCriteriaRepositoryOperations
- Type Parameters:
T
- The generic type- Parameters:
query
- The query- Returns:
- An iterable result
-
findAll
public <T> CompletionStage<List<T>> findAll(jakarta.persistence.criteria.CriteriaQuery<T> query, int offset, int limit) Description copied from interface:AsyncCriteriaRepositoryOperations
Finds all results for the given query.- Specified by:
findAll
in interfaceAsyncCriteriaRepositoryOperations
- Type Parameters:
T
- The generic type- Parameters:
query
- The queryoffset
- The offsetlimit
- The limit- Returns:
- An iterable result
-
updateAll
Description copied from interface:AsyncCriteriaRepositoryOperations
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 interfaceAsyncCriteriaRepositoryOperations
- Parameters:
query
- The prepared query- Returns:
- An optional number with the count of the number of records updated
-
deleteAll
Description copied from interface:AsyncCriteriaRepositoryOperations
Executes 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 interfaceAsyncCriteriaRepositoryOperations
- Parameters:
query
- The query- Returns:
- An optional number with the count of the number of records updated
-