Class DefaultCountInterceptor<T>
- java.lang.Object
-
- io.micronaut.data.runtime.intercept.AbstractQueryInterceptor<T,java.lang.Number>
-
- io.micronaut.data.runtime.intercept.DefaultCountInterceptor<T>
-
- Type Parameters:
T
- The declaring type
- All Implemented Interfaces:
CountInterceptor<T>
,DataInterceptor<T,java.lang.Number>
public class DefaultCountInterceptor<T> extends AbstractQueryInterceptor<T,java.lang.Number> implements CountInterceptor<T>
Default implementation ofCountInterceptor
.- Since:
- 1.0.0
- Author:
- graemerocher
-
-
Field Summary
-
Fields inherited from class io.micronaut.data.runtime.intercept.AbstractQueryInterceptor
operations, preparedQueryResolver
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultCountInterceptor(RepositoryOperations datastore)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Number
intercept(RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T,java.lang.Number> context)
Intercepts a data method execution.-
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, getReturnType, getUpdateAllBatchOperation, getUpdateOperation, getUpdateOperation, instantiateEntity, isNullable, isNumber, prepareCountQuery, prepareQuery, prepareQuery, prepareQuery, validateNullArguments
-
-
-
-
Constructor Detail
-
DefaultCountInterceptor
protected DefaultCountInterceptor(@NonNull RepositoryOperations datastore)
Default constructor.- Parameters:
datastore
- The operations
-
-
Method Detail
-
intercept
public java.lang.Number intercept(RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T,java.lang.Number> context)
Description copied from interface:DataInterceptor
Intercepts a data method execution.- Specified by:
intercept
in interfaceDataInterceptor<T,java.lang.Number>
- Parameters:
methodKey
- The method keycontext
- The context- Returns:
- The result
-
-