Class AbstractSpecificationInterceptor<T,R>
java.lang.Object
io.micronaut.data.runtime.intercept.AbstractQueryInterceptor<T,R>
io.micronaut.data.runtime.intercept.criteria.AbstractSpecificationInterceptor<T,R>
- Type Parameters:
T
- The declaring typeR
- The return type
- All Implemented Interfaces:
DataInterceptor<T,
R>
- Direct Known Subclasses:
AbstractAsyncSpecificationInterceptor
,AbstractReactiveSpecificationInterceptor
,CountSpecificationInterceptor
,DeleteAllSpecificationInterceptor
,ExistsSpecificationInterceptor
,FindAllSpecificationInterceptor
,FindOneSpecificationInterceptor
,FindPageSpecificationInterceptor
,UpdateAllSpecificationInterceptor
@Internal
public abstract class AbstractSpecificationInterceptor<T,R>
extends AbstractQueryInterceptor<T,R>
Abstract specification interceptor.
- Since:
- 3.2
- Author:
- Denis Stepanov
-
Nested Class Summary
-
Field Summary
Fields inherited from class io.micronaut.data.runtime.intercept.AbstractQueryInterceptor
conversionService, operations, preparedQueryResolver
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractSpecificationInterceptor
(RepositoryOperations operations) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected <K> @NonNull CriteriaDeleteBuilder<K>
getCriteriaDeleteBuilder
(io.micronaut.aop.MethodInvocationContext<?, ?> context) FindCriteriaDeleteBuilder
orQuerySpecification
in context.protected <K> @NonNull CriteriaQueryBuilder<K>
getCriteriaQueryBuilder
(io.micronaut.aop.MethodInvocationContext<?, ?> context, Set<JoinPath> joinPaths) FindCriteriaQueryBuilder
orQuerySpecification
in context.protected <K> @NonNull CriteriaUpdateBuilder<K>
getCriteriaUpdateBuilder
(io.micronaut.aop.MethodInvocationContext<?, ?> context) FindCriteriaUpdateBuilder
orQuerySpecification
in context.protected <K> @Nullable DeleteSpecification<K>
getDeleteSpecification
(io.micronaut.aop.MethodInvocationContext<?, ?> context) FindDeleteSpecification
in context.protected <K> @Nullable QuerySpecification<K>
getQuerySpecification
(io.micronaut.aop.MethodInvocationContext<?, ?> context) FindQuerySpecification
in context.protected <K> @Nullable UpdateSpecification<K>
getUpdateSpecification
(io.micronaut.aop.MethodInvocationContext<?, ?> context) FindUpdateSpecification
in context.protected final <E,
QR> @NonNull PreparedQuery<E, QR> preparedQueryForCriteria
(RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T, R> context, AbstractSpecificationInterceptor.Type type) Methods inherited from class io.micronaut.data.runtime.intercept.AbstractQueryInterceptor
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.data.intercept.DataInterceptor
intercept
-
Constructor Details
-
AbstractSpecificationInterceptor
Default constructor.- Parameters:
operations
- The operations
-
-
Method Details
-
preparedQueryForCriteria
@NonNull protected final <E,QR> @NonNull PreparedQuery<E,QR> preparedQueryForCriteria(RepositoryMethodKey methodKey, io.micronaut.aop.MethodInvocationContext<T, R> context, AbstractSpecificationInterceptor.Type type) -
getQuerySpecification
@Nullable protected <K> @Nullable QuerySpecification<K> getQuerySpecification(io.micronaut.aop.MethodInvocationContext<?, ?> context) FindQuerySpecification
in context.- Type Parameters:
K
- the specification entity root type- Parameters:
context
- The context- Returns:
- found specification
-
getCriteriaQueryBuilder
@NonNull protected <K> @NonNull CriteriaQueryBuilder<K> getCriteriaQueryBuilder(io.micronaut.aop.MethodInvocationContext<?, ?> context, Set<JoinPath> joinPaths) FindCriteriaQueryBuilder
orQuerySpecification
in context.- Type Parameters:
K
- the result type- Parameters:
context
- The contextjoinPaths
- The join fetch paths- Returns:
- found specification
-
getDeleteSpecification
@Nullable protected <K> @Nullable DeleteSpecification<K> getDeleteSpecification(io.micronaut.aop.MethodInvocationContext<?, ?> context) FindDeleteSpecification
in context.- Type Parameters:
K
- the specification entity root type- Parameters:
context
- The context- Returns:
- found specification
-
getCriteriaDeleteBuilder
@NonNull protected <K> @NonNull CriteriaDeleteBuilder<K> getCriteriaDeleteBuilder(io.micronaut.aop.MethodInvocationContext<?, ?> context) FindCriteriaDeleteBuilder
orQuerySpecification
in context.- Type Parameters:
K
- the result type- Parameters:
context
- The context- Returns:
- found specification
-
getUpdateSpecification
@Nullable protected <K> @Nullable UpdateSpecification<K> getUpdateSpecification(io.micronaut.aop.MethodInvocationContext<?, ?> context) FindUpdateSpecification
in context.- Type Parameters:
K
- the specification entity root type- Parameters:
context
- The context- Returns:
- found specification
-
getCriteriaUpdateBuilder
@NonNull protected <K> @NonNull CriteriaUpdateBuilder<K> getCriteriaUpdateBuilder(io.micronaut.aop.MethodInvocationContext<?, ?> context) FindCriteriaUpdateBuilder
orQuerySpecification
in context.- Type Parameters:
K
- the result type- Parameters:
context
- The context- Returns:
- found specification
-