Class DefaultCountAsyncInterceptor<T>
java.lang.Object
io.micronaut.data.runtime.intercept.AbstractQueryInterceptor<T,CompletionStage<R>>
io.micronaut.data.runtime.intercept.async.AbstractAsyncInterceptor<T,Long>
io.micronaut.data.runtime.intercept.async.DefaultCountAsyncInterceptor<T>
- Type Parameters:
T
- The declaring type
- All Implemented Interfaces:
CountAsyncInterceptor<T>
,DataInterceptor<T,
CompletionStage<Long>>
public class DefaultCountAsyncInterceptor<T>
extends AbstractAsyncInterceptor<T,Long>
implements CountAsyncInterceptor<T>
Default implementation of
CountAsyncInterceptor
.- Since:
- 1.0.0
- Author:
- graemerocher
-
Field Summary
Fields inherited from class io.micronaut.data.runtime.intercept.async.AbstractAsyncInterceptor
asyncDatastoreOperations, LIST_OF_OBJECTS
Fields inherited from class io.micronaut.data.runtime.intercept.AbstractQueryInterceptor
conversionService, operations, preparedQueryResolver
-
Constructor Summary
ModifierConstructorDescriptionprotected
DefaultCountAsyncInterceptor
(RepositoryOperations datastore) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionintercept
(RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T, CompletionStage<Long>> context) Intercepts a data method execution.Methods inherited from class io.micronaut.data.runtime.intercept.async.AbstractAsyncInterceptor
convertNumberToReturnType, findReturnType, getReturnType
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, getPageable, getPagedQuery, getParameterInRole, getParameterValueMap, getRequiredEntity, getRequiredParameterInRole, getRequiredRootEntity, getUpdateAllBatchOperation, getUpdateOperation, getUpdateOperation, instantiateEntity, isNullable, isNumber, prepareCountQuery, prepareQuery, prepareQuery, prepareQuery, validateNullArguments
-
Constructor Details
-
DefaultCountAsyncInterceptor
Default constructor.- Parameters:
datastore
- The operations
-
-
Method Details
-
intercept
public CompletionStage<Long> intercept(RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T, CompletionStage<Long>> context) Description copied from interface:DataInterceptor
Intercepts a data method execution.- Specified by:
intercept
in interfaceDataInterceptor<T,
CompletionStage<Long>> - Parameters:
methodKey
- The method keycontext
- The context- Returns:
- The result
-