Class AbstractAsyncInterceptor<T,R>
java.lang.Object
io.micronaut.data.runtime.intercept.AbstractQueryInterceptor<T,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,CompletionStage<R>>
- Direct Known Subclasses:
AbstractConvertCompletionStageInterceptor,AbstractCountConvertCompletionStageInterceptor,DefaultCountAsyncInterceptor,DefaultExistsByAsyncInterceptor,DefaultProcedureReturningOneAsyncInterceptor
public abstract class AbstractAsyncInterceptor<T,R>
extends AbstractQueryInterceptor<T,CompletionStage<R>>
Abstract asynchronous interceptor implementation.
- Since:
- 1.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final @NonNull io.micronaut.data.operations.async.AsyncRepositoryOperationsFields inherited from class io.micronaut.data.runtime.intercept.AbstractQueryInterceptor
conversionService, operations, preparedQueryResolver -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractAsyncInterceptor(@NonNull io.micronaut.data.operations.RepositoryOperations datastore) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected @Nullable NumberconvertNumberToReturnType(io.micronaut.aop.MethodInvocationContext<?, ?> context, Number number) Convert a number argument if necessary.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.Methods 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, getLimit, getOffset, getPageable, getPageableInRole, getPagedQuery, getParameterInRole, getParameterValueMap, getRequiredEntity, getRequiredParameterInRole, getRequiredRootEntity, getUpdateAllBatchOperation, getUpdateOperation, getUpdateOperation, instantiateEntity, isNullable, isNumber, prepareCountQuery, 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
-
asyncDatastoreOperations
@NonNull protected final @NonNull io.micronaut.data.operations.async.AsyncRepositoryOperations asyncDatastoreOperations
-
-
Constructor Details
-
AbstractAsyncInterceptor
protected AbstractAsyncInterceptor(@NonNull @NonNull io.micronaut.data.operations.RepositoryOperations datastore) Default constructor.- Parameters:
datastore- The operations
-
-
Method Details
-
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,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 @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
-