Class QueryCriteriaMethodMatch
java.lang.Object
io.micronaut.data.processor.visitors.finders.AbstractCriteriaMethodMatch
io.micronaut.data.processor.visitors.finders.criteria.QueryCriteriaMethodMatch
- All Implemented Interfaces:
MethodMatcher.MethodMatch
Query criteria method match.
- Since:
- 3.2
- Author:
- Denis Stepanov
-
Nested Class Summary
Nested classes/interfaces inherited from class io.micronaut.data.processor.visitors.finders.AbstractCriteriaMethodMatch
AbstractCriteriaMethodMatch.MethodResult -
Field Summary
Fields inherited from class io.micronaut.data.processor.visitors.finders.AbstractCriteriaMethodMatch
matches -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> voidapplyProjections(String projectionPart, PersistentEntityRoot<T> root, PersistentEntityCriteriaQuery<T> query, PersistentEntityCriteriaBuilder cb, String returnTypeName) Apply projections.protected MethodMatchInfobuild(MethodMatchContext matchContext) protected final PersistentEntityCriteriaQuery<Object>createDefaultCountQuery(MethodMatchContext matchContext, PersistentEntityCriteriaBuilder cb, List<io.micronaut.core.annotation.AnnotationValue<Join>> joinSpecs) Create a count query.protected PersistentEntityCriteriaQuery<Object>createQuery(MethodMatchContext matchContext, PersistentEntityCriteriaBuilder cb, List<io.micronaut.core.annotation.AnnotationValue<Join>> joinSpecs) Create a query from the method.protected DataMethod.OperationTypeprotected <T> voidsetDistinct(PersistentEntityCriteriaQuery<T> query) Apply the distinct value.Methods inherited from class io.micronaut.data.processor.visitors.finders.AbstractCriteriaMethodMatch
analyzeMethodResult, analyzeMethodResult, applyJoinSpecs, buildMatchInfo, extractPredicates, extractPredicates, findProperty, findSelections, getDtoProjectionProperties, getEntitiesParameter, getEntityParameter, getProperty, hasNoWhereAndJoinDeclaration, interceptPredicate, joinSpecsAtMatchContext, resolveReturnTypeAndInterceptor, supportedByImplicitQueries
-
Constructor Details
-
QueryCriteriaMethodMatch
Default constructor.- Parameters:
matches- The matches
-
-
Method Details
-
createQuery
protected PersistentEntityCriteriaQuery<Object> createQuery(MethodMatchContext matchContext, PersistentEntityCriteriaBuilder cb, List<io.micronaut.core.annotation.AnnotationValue<Join>> joinSpecs) Create a query from the method.- Parameters:
matchContext- The match contextcb- The criteria builderjoinSpecs- The joinSpecs- Returns:
- A new query
-
createDefaultCountQuery
protected final PersistentEntityCriteriaQuery<Object> createDefaultCountQuery(MethodMatchContext matchContext, PersistentEntityCriteriaBuilder cb, List<io.micronaut.core.annotation.AnnotationValue<Join>> joinSpecs) Create a count query.- Parameters:
matchContext- The match contextcb- The criteria builderjoinSpecs- The joinSpecs- Returns:
- A new query
-
setDistinct
Apply the distinct value.- Type Parameters:
T- The query type- Parameters:
query- The query
-
build
- Specified by:
buildin classAbstractCriteriaMethodMatch
-
applyProjections
protected <T> void applyProjections(String projectionPart, PersistentEntityRoot<T> root, PersistentEntityCriteriaQuery<T> query, PersistentEntityCriteriaBuilder cb, String returnTypeName) Apply projections.- Type Parameters:
T- The entity type- Parameters:
projectionPart- The projectionroot- The rootquery- The querycb- The criteria builderreturnTypeName- The returnTypeName
-
getOperationType
- Specified by:
getOperationTypein classAbstractCriteriaMethodMatch- Returns:
- The operation type
-