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
ConstructorsConstructorDescriptionExecutorAsyncOperationsSupportingCriteria(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.CriteriaBuilderExecutes 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, updateAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.data.operations.async.AsyncCriteriaRepositoryOperations
asyncMethods 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:
getCriteriaBuilderin interfaceAsyncCriteriaRepositoryOperations- Returns:
- The criteria builder
-
exists
Description copied from interface:AsyncCriteriaRepositoryOperationsExists query.- Specified by:
existsin interfaceAsyncCriteriaRepositoryOperations- Parameters:
query- The query- Returns:
- True if query returns true or any row
-
findOne
Description copied from interface:AsyncCriteriaRepositoryOperationsFind one by Query.- Specified by:
findOnein interfaceAsyncCriteriaRepositoryOperations- Type Parameters:
R- The result type- Parameters:
query- The query- Returns:
- A result or null
-
findAll
Description copied from interface:AsyncCriteriaRepositoryOperationsFinds all results for the given query.- Specified by:
findAllin 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:AsyncCriteriaRepositoryOperationsFinds all results for the given query.- Specified by:
findAllin interfaceAsyncCriteriaRepositoryOperations- Type Parameters:
T- The generic type- Parameters:
query- The queryoffset- The offsetlimit- The limit- Returns:
- An iterable result
-
updateAll
Description copied from interface:AsyncCriteriaRepositoryOperationsExecutes 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:
updateAllin interfaceAsyncCriteriaRepositoryOperations- Parameters:
query- The prepared query- Returns:
- An optional number with the count of the number of records updated
-
deleteAll
Description copied from interface:AsyncCriteriaRepositoryOperationsExecutes delete for the given query and parameter values. If it is possible to return the number of objects deleted, then do so.- Specified by:
deleteAllin interfaceAsyncCriteriaRepositoryOperations- Parameters:
query- The query- Returns:
- An optional number with the count of the number of records updated
-