Class AbstractAsyncSpecificationInterceptor<T,R>
java.lang.Object
io.micronaut.data.runtime.intercept.AbstractQueryInterceptor<T,R>
io.micronaut.data.runtime.intercept.criteria.AbstractSpecificationInterceptor<T,R>
io.micronaut.data.runtime.intercept.criteria.async.AbstractAsyncSpecificationInterceptor<T,R>
- Type Parameters:
T- The declaring typeR- The return type
- All Implemented Interfaces:
io.micronaut.data.intercept.DataInterceptor<T,R>
- Direct Known Subclasses:
CountAsyncSpecificationInterceptor,DeleteAllAsyncSpecificationInterceptor,ExistsAsyncSpecificationInterceptor,FindAllAsyncSpecificationInterceptor,FindOneAsyncSpecificationInterceptor,FindPageAsyncSpecificationInterceptor,UpdateAllAsyncSpecificationInterceptor
@Internal
public abstract class AbstractAsyncSpecificationInterceptor<T,R>
extends AbstractSpecificationInterceptor<T,R>
Abstract async specification interceptor.
- Since:
- 3.2
-
Nested Class Summary
Nested classes/interfaces inherited from class io.micronaut.data.runtime.intercept.criteria.AbstractSpecificationInterceptor
AbstractSpecificationInterceptor.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final io.micronaut.data.operations.async.AsyncCriteriaRepositoryOperationsprotected final io.micronaut.data.operations.async.AsyncRepositoryOperationsFields inherited from class io.micronaut.data.runtime.intercept.criteria.AbstractSpecificationInterceptor
criteriaRepositoryOperationsFields inherited from class io.micronaut.data.runtime.intercept.AbstractQueryInterceptor
conversionService, operations, preparedQueryResolver -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractAsyncSpecificationInterceptor(io.micronaut.data.operations.RepositoryOperations operations) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected @Nullable NumberconvertNumberToReturnType(io.micronaut.aop.MethodInvocationContext<?, ?> context, Number number) Convert a number argument if necessary.protected final @NonNull CompletionStage<Number>countAsync(io.micronaut.data.intercept.RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T, R> context) protected final CompletionStage<Number>deleteAllAsync(io.micronaut.data.intercept.RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T, R> context) protected final CompletionStage<Boolean>existsAsync(io.micronaut.data.intercept.RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T, R> context) protected final @NonNull CompletionStage<Iterable<Object>>findAllAsync(io.micronaut.data.intercept.RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T, R> context, AbstractSpecificationInterceptor.Type type) protected final @NonNull CompletionStage<Object>findOneAsync(io.micronaut.data.intercept.RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T, R> context, AbstractSpecificationInterceptor.Type type) protected final io.micronaut.core.type.Argument<?>findReturnType(io.micronaut.aop.MethodInvocationContext<?, ?> context, io.micronaut.core.type.Argument<?> defaultArg) protected final io.micronaut.core.type.Argument<?>getReturnType(io.micronaut.aop.MethodInvocationContext<?, ?> context) Returns the return type.protected final CompletionStage<Number>updateAllAsync(io.micronaut.data.intercept.RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T, R> context) Methods inherited from class io.micronaut.data.runtime.intercept.criteria.AbstractSpecificationInterceptor
buildCountQuery, buildDeleteQuery, buildExistsQuery, buildQuery, buildUpdateQuery, count, deleteAll, exists, findAll, findOne, getCriteriaDeleteBuilder, getCriteriaQueryBuilder, getCriteriaUpdateBuilder, getDeleteSpecification, getMethodJoinPaths, getQuerySpecification, getUpdateSpecification, preparedQueryForCriteria, updateAllMethods inherited from class io.micronaut.data.runtime.intercept.AbstractQueryInterceptor
convertOne, convertOne, count, findEntitiesParameter, findEntityParameter, getDeleteAllBatchOperation, getDeleteBatchOperation, getDeleteBatchOperation, getDeleteOperation, getDeleteReturningBatchOperation, getDeleteReturningOperation, getEntitiesParameter, getEntityParameter, getInsertBatchOperation, getInsertBatchOperation, getInsertOperation, getInsertOperation, getPageable, getPagedQuery, getParameterValueMap, getRequiredEntity, getRequiredRootEntity, getUpdateAllBatchOperation, getUpdateOperation, getUpdateOperation, instantiateEntity, isNullable, isNumber, prepareCountQuery, prepareQuery, prepareQuery, prepareQuery, validateNullArgumentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.data.intercept.DataInterceptor
intercept
-
Field Details
-
LIST_OF_OBJECTS
-
asyncOperations
protected final io.micronaut.data.operations.async.AsyncRepositoryOperations asyncOperations -
asyncCriteriaOperations
protected final io.micronaut.data.operations.async.AsyncCriteriaRepositoryOperations asyncCriteriaOperations
-
-
Constructor Details
-
AbstractAsyncSpecificationInterceptor
protected AbstractAsyncSpecificationInterceptor(io.micronaut.data.operations.RepositoryOperations operations) Default constructor.- Parameters:
operations- The operations
-
-
Method Details
-
findAllAsync
@NonNull protected final @NonNull CompletionStage<Iterable<Object>> findAllAsync(io.micronaut.data.intercept.RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T, R> context, AbstractSpecificationInterceptor.Type type) -
findOneAsync
@NonNull protected final @NonNull CompletionStage<Object> findOneAsync(io.micronaut.data.intercept.RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T, R> context, AbstractSpecificationInterceptor.Type type) -
countAsync
@NonNull protected final @NonNull CompletionStage<Number> countAsync(io.micronaut.data.intercept.RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T, R> context) -
existsAsync
protected final CompletionStage<Boolean> existsAsync(io.micronaut.data.intercept.RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T, R> context) -
deleteAllAsync
protected final CompletionStage<Number> deleteAllAsync(io.micronaut.data.intercept.RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T, R> context) -
updateAllAsync
protected final CompletionStage<Number> updateAllAsync(io.micronaut.data.intercept.RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T, R> context) -
getReturnType
protected final io.micronaut.core.type.Argument<?> getReturnType(io.micronaut.aop.MethodInvocationContext<?, ?> context) Description copied from class:AbstractQueryInterceptorReturns the return type.- Overrides:
getReturnTypein classAbstractQueryInterceptor<T,R> - Parameters:
context- The context- Returns:
- the return type
-
findReturnType
protected final io.micronaut.core.type.Argument<?> findReturnType(io.micronaut.aop.MethodInvocationContext<?, ?> context, io.micronaut.core.type.Argument<?> defaultArg) -
convertNumberToReturnType
@Nullable protected @Nullable Number convertNumberToReturnType(io.micronaut.aop.MethodInvocationContext<?, ?> context, Number number) Convert a number argument if necessary.- Parameters:
context- The method contextnumber- The number- Returns:
- The result
-