Class AbstractCriteriaMethodMatch
java.lang.Object
io.micronaut.data.processor.visitors.finders.AbstractCriteriaMethodMatch
- All Implemented Interfaces:
- MethodMatcher.MethodMatch
- Direct Known Subclasses:
- DeleteCriteriaMethodMatch,- QueryCriteriaMethodMatch,- UpdateCriteriaMethodMatch
public abstract class AbstractCriteriaMethodMatch
extends Object
implements MethodMatcher.MethodMatch
Abstract criteria matcher.
- Since:
- 3.2
- Author:
- Denis Stepanov
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected <T> StringapplyForUpdate(String querySequence, PersistentEntityCriteriaQuery<T> query) Matches for update definitions in the query sequence.protected final voidapplyJoinSpecs(PersistentEntityRoot<?> root, @NonNull List<io.micronaut.core.annotation.AnnotationValue<Join>> joinSpecs) protected <T> voidapplyPredicates(String querySequence, io.micronaut.inject.ast.ParameterElement[] parameters, PersistentEntityRoot<T> root, PersistentEntityCriteriaDelete<T> query, SourcePersistentEntityCriteriaBuilder cb) Apply predicates.protected <T> voidapplyPredicates(String querySequence, io.micronaut.inject.ast.ParameterElement[] parameters, PersistentEntityRoot<T> root, PersistentEntityCriteriaQuery<T> query, SourcePersistentEntityCriteriaBuilder cb) Apply predicates.protected <T> voidapplyPredicates(String querySequence, io.micronaut.inject.ast.ParameterElement[] parameters, PersistentEntityRoot<T> root, PersistentEntityCriteriaUpdate<T> query, SourcePersistentEntityCriteriaBuilder cb) Apply predicates.protected <T> voidapplyPredicates(List<io.micronaut.inject.ast.ParameterElement> parameters, PersistentEntityRoot<T> root, PersistentEntityCriteriaDelete<T> query, SourcePersistentEntityCriteriaBuilder cb) Apply predicates based on parameters.protected <T> voidapplyPredicates(List<io.micronaut.inject.ast.ParameterElement> parameters, PersistentEntityRoot<T> root, PersistentEntityCriteriaQuery<T> query, SourcePersistentEntityCriteriaBuilder cb) Apply predicates based on parameters.protected <T> voidapplyPredicates(List<io.micronaut.inject.ast.ParameterElement> parameters, PersistentEntityRoot<T> root, PersistentEntityCriteriaUpdate<T> query, SourcePersistentEntityCriteriaBuilder cb) Apply predicates based on parameters.protected abstract MethodMatchInfobuild(MethodMatchContext matchContext) final MethodMatchInfobuildMatchInfo(MethodMatchContext matchContext) Match info builder.protected final <T> PersistentPropertyPath<Object>findProperty(PersistentEntityRoot<T> root, String propertyName) protected @Nullable io.micronaut.inject.ast.ParameterElementprotected @Nullable io.micronaut.inject.ast.ParameterElementprotected final io.micronaut.inject.ast.ClassElementgetInterceptorElement(MethodMatchContext matchContext, Class<? extends DataInterceptor> interceptorType) protected abstract DataMethod.OperationTypeprotected final <T> @NonNull jakarta.persistence.criteria.Expression<?>getProperty(PersistentEntityRoot<T> root, String propertyName) protected final booleanhasNoWhereAndJoinDeclaration(@NonNull MethodMatchContext matchContext) joinSpecsAtMatchContext(@NonNull MethodMatchContext matchContext, boolean isQuery) protected FindersUtils.InterceptorMatchresolveReturnTypeAndInterceptor(MethodMatchContext matchContext) protected boolean
- 
Field Details- 
matcher
 
- 
- 
Constructor Details- 
AbstractCriteriaMethodMatch
 
- 
- 
Method Details- 
getEntityParameter@Nullable protected @Nullable io.micronaut.inject.ast.ParameterElement getEntityParameter()- Returns:
- The entity parameter
 
- 
getEntitiesParameter@Nullable protected @Nullable io.micronaut.inject.ast.ParameterElement getEntitiesParameter()- Returns:
- The entities parameter
 
- 
getOperationType- Returns:
- The operation type
 
- 
supportedByImplicitQueriesprotected boolean supportedByImplicitQueries()- Returns:
- true of the operation is supported by implicit queries
 
- 
buildMatchInfoDescription copied from interface:MethodMatcher.MethodMatchMatch info builder.- Specified by:
- buildMatchInfoin interface- MethodMatcher.MethodMatch
- Parameters:
- matchContext- The match context
- Returns:
- The match info
 
- 
build
- 
getInterceptorElementprotected final io.micronaut.inject.ast.ClassElement getInterceptorElement(MethodMatchContext matchContext, Class<? extends DataInterceptor> interceptorType) - Parameters:
- matchContext- The match context
- interceptorType- The interceptor type
- Returns:
- The resolved class element
 
- 
resolveReturnTypeAndInterceptorprotected FindersUtils.InterceptorMatch resolveReturnTypeAndInterceptor(MethodMatchContext matchContext) - Parameters:
- matchContext- The match context
- Returns:
- resolved return type and interceptor
 
- 
applyPredicatesprotected <T> void applyPredicates(String querySequence, io.micronaut.inject.ast.ParameterElement[] parameters, PersistentEntityRoot<T> root, PersistentEntityCriteriaQuery<T> query, SourcePersistentEntityCriteriaBuilder cb) Apply predicates.- Type Parameters:
- T- The entity type
- Parameters:
- querySequence- The query sequence
- parameters- The parameters
- root- The root
- query- The query
- cb- The criteria builder
 
- 
applyPredicatesprotected <T> void applyPredicates(String querySequence, io.micronaut.inject.ast.ParameterElement[] parameters, PersistentEntityRoot<T> root, PersistentEntityCriteriaDelete<T> query, SourcePersistentEntityCriteriaBuilder cb) Apply predicates.- Type Parameters:
- T- The entity type
- Parameters:
- querySequence- The query sequence
- parameters- The parameters
- root- The root
- query- The query
- cb- The criteria builder
 
- 
applyPredicatesprotected <T> void applyPredicates(String querySequence, io.micronaut.inject.ast.ParameterElement[] parameters, PersistentEntityRoot<T> root, PersistentEntityCriteriaUpdate<T> query, SourcePersistentEntityCriteriaBuilder cb) Apply predicates.- Type Parameters:
- T- The entity type
- Parameters:
- querySequence- The query sequence
- parameters- The parameters
- root- The root
- query- The query
- cb- The criteria builder
 
- 
applyPredicatesprotected <T> void applyPredicates(List<io.micronaut.inject.ast.ParameterElement> parameters, PersistentEntityRoot<T> root, PersistentEntityCriteriaQuery<T> query, SourcePersistentEntityCriteriaBuilder cb) Apply predicates based on parameters.- Type Parameters:
- T- The entity type
- Parameters:
- parameters- The parameters
- root- The root
- query- The query
- cb- The criteria builder
 
- 
applyPredicatesprotected <T> void applyPredicates(List<io.micronaut.inject.ast.ParameterElement> parameters, PersistentEntityRoot<T> root, PersistentEntityCriteriaUpdate<T> query, SourcePersistentEntityCriteriaBuilder cb) Apply predicates based on parameters.- Type Parameters:
- T- The entity type
- Parameters:
- parameters- The parameters
- root- The root
- query- The query
- cb- The criteria builder
 
- 
applyPredicatesprotected <T> void applyPredicates(List<io.micronaut.inject.ast.ParameterElement> parameters, PersistentEntityRoot<T> root, PersistentEntityCriteriaDelete<T> query, SourcePersistentEntityCriteriaBuilder cb) Apply predicates based on parameters.- Type Parameters:
- T- The entity type
- Parameters:
- parameters- The parameters
- root- The root
- query- The query
- cb- The criteria builder
 
- 
applyForUpdateMatches for update definitions in the query sequence.- Type Parameters:
- T- The entity type
- Parameters:
- querySequence- The query sequence
- query- The query
- Returns:
- The new query sequence without the for update definitions
 
- 
getProperty@NonNull protected final <T> @NonNull jakarta.persistence.criteria.Expression<?> getProperty(PersistentEntityRoot<T> root, String propertyName) 
- 
findProperty@Nullable protected final <T> PersistentPropertyPath<Object> findProperty(PersistentEntityRoot<T> root, String propertyName) 
- 
applyJoinSpecsprotected final void applyJoinSpecs(PersistentEntityRoot<?> root, @NonNull @NonNull List<io.micronaut.core.annotation.AnnotationValue<Join>> joinSpecs) 
- 
joinSpecsAtMatchContext@NonNull protected final @NonNull List<io.micronaut.core.annotation.AnnotationValue<Join>> joinSpecsAtMatchContext(@NonNull @NonNull MethodMatchContext matchContext, boolean isQuery) - Parameters:
- matchContext- The match context
- isQuery- true if is a query criteria
- Returns:
- a List of annotations values for Joinannotation.
 
- 
hasNoWhereAndJoinDeclarationprotected final boolean hasNoWhereAndJoinDeclaration(@NonNull @NonNull MethodMatchContext matchContext) 
 
-