Class AbstractAsyncInterceptor<T,R>
- java.lang.Object
-
- io.micronaut.data.runtime.intercept.AbstractQueryInterceptor<T,java.util.concurrent.CompletionStage<R>>
-
- io.micronaut.data.runtime.intercept.async.AbstractAsyncInterceptor<T,R>
-
- Type Parameters:
T- The declaring typeR- The result type.
- All Implemented Interfaces:
io.micronaut.data.intercept.DataInterceptor<T,java.util.concurrent.CompletionStage<R>>
- Direct Known Subclasses:
AbstractConvertCompletionStageInterceptor,AbstractCountConvertCompletionStageInterceptor,DefaultCountAsyncInterceptor,DefaultExistsByAsyncInterceptor
public abstract class AbstractAsyncInterceptor<T,R> extends AbstractQueryInterceptor<T,java.util.concurrent.CompletionStage<R>>
Abstract asynchronous interceptor implementation.- Since:
- 1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description protected io.micronaut.data.operations.async.AsyncRepositoryOperationsasyncDatastoreOperationsprotected static io.micronaut.core.type.Argument<java.util.List<java.lang.Object>>LIST_OF_OBJECTS-
Fields inherited from class io.micronaut.data.runtime.intercept.AbstractQueryInterceptor
operations, preparedQueryResolver
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractAsyncInterceptor(io.micronaut.data.operations.RepositoryOperations datastore)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.NumberconvertNumberToReturnType(io.micronaut.aop.MethodInvocationContext<?,?> context, java.lang.Number number)Convert a number argument if necessary.protected io.micronaut.core.type.Argument<?>findReturnType(io.micronaut.aop.MethodInvocationContext<?,?> context, io.micronaut.core.type.Argument<?> defaultArg)protected io.micronaut.core.type.Argument<?>getReturnType(io.micronaut.aop.MethodInvocationContext<?,?> context)Returns the return type.-
Methods inherited from class io.micronaut.data.runtime.intercept.AbstractQueryInterceptor
convertNumberArgumentIfNecessary, convertOne, convertOne, count, findEntitiesParameter, findEntityParameter, getDeleteAllBatchOperation, getDeleteBatchOperation, getDeleteBatchOperation, getDeleteOperation, getEntitiesParameter, getEntityParameter, getInsertBatchOperation, getInsertBatchOperation, getInsertOperation, getInsertOperation, getPageable, getPagedQuery, getParameterValueMap, getRequiredEntity, getRequiredRootEntity, getUpdateAllBatchOperation, getUpdateOperation, getUpdateOperation, instantiateEntity, isNullable, isNumber, prepareCountQuery, prepareQuery, prepareQuery, prepareQuery, validateNullArguments
-
-
-
-
Method Detail
-
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,java.util.concurrent.CompletionStage<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 java.lang.Number convertNumberToReturnType(io.micronaut.aop.MethodInvocationContext<?,?> context, java.lang.Number number)Convert a number argument if necessary.- Parameters:
context- The method contextnumber- The number- Returns:
- The result
-
-