Class UpdateCriteriaMethodMatch
java.lang.Object
io.micronaut.data.processor.visitors.finders.AbstractCriteriaMethodMatch
io.micronaut.data.processor.visitors.finders.criteria.UpdateCriteriaMethodMatch
- All Implemented Interfaces:
MethodMatcher.MethodMatch
Update 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
ConstructorsConstructorDescriptionUpdateCriteriaMethodMatch(List<MethodNameParser.Match> matches, boolean isReturning) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> voidaddPropertiesToUpdate(List<io.micronaut.inject.ast.ParameterElement> nonConsumedParameters, MethodMatchContext matchContext, PersistentEntityRoot<T> root, PersistentEntityCriteriaUpdate<T> query, SourcePersistentEntityCriteriaBuilder cb) protected <T> voidapply(MethodMatchContext matchContext, PersistentEntityRoot<T> root, PersistentEntityCriteriaUpdate<T> query, SourcePersistentEntityCriteriaBuilder cb) Apply query match.protected <T> voidapplyProjections(String projection, PersistentEntityRoot<T> root, PersistentEntityCriteriaUpdate<T> query, PersistentEntityCriteriaBuilder cb) Apply projections.protected MethodMatchInfobuild(MethodMatchContext matchContext) protected DataMethod.OperationTypeprotected <T> jakarta.persistence.criteria.PredicateinterceptPredicate(MethodMatchContext matchContext, List<io.micronaut.inject.ast.ParameterElement> notConsumedParameters, PersistentEntityRoot<T> root, PersistentEntityCriteriaBuilder cb, jakarta.persistence.criteria.Predicate existingPredicate) Intercept the predicate being applied.Methods inherited from class io.micronaut.data.processor.visitors.finders.AbstractCriteriaMethodMatch
analyzeMethodResult, analyzeMethodResult, applyJoinSpecs, buildMatchInfo, extractPredicates, extractPredicates, findProperty, findSelections, getDtoProjectionProperties, getEntitiesParameter, getEntityParameter, getProperty, hasNoWhereAndJoinDeclaration, joinSpecsAtMatchContext, resolveReturnTypeAndInterceptor, supportedByImplicitQueries
-
Constructor Details
-
UpdateCriteriaMethodMatch
Default constructor.- Parameters:
matches- The matchesisReturning- The returning
-
-
Method Details
-
apply
protected <T> void apply(MethodMatchContext matchContext, PersistentEntityRoot<T> root, PersistentEntityCriteriaUpdate<T> query, SourcePersistentEntityCriteriaBuilder cb) Apply query match.- Type Parameters:
T- The entity type- Parameters:
matchContext- The match contextroot- The rootquery- The querycb- The criteria builder
-
interceptPredicate
protected <T> jakarta.persistence.criteria.Predicate interceptPredicate(MethodMatchContext matchContext, List<io.micronaut.inject.ast.ParameterElement> notConsumedParameters, PersistentEntityRoot<T> root, PersistentEntityCriteriaBuilder cb, jakarta.persistence.criteria.Predicate existingPredicate) Description copied from class:AbstractCriteriaMethodMatchIntercept the predicate being applied.- Overrides:
interceptPredicatein classAbstractCriteriaMethodMatch- Type Parameters:
T- The entity type- Parameters:
matchContext- The matchContextnotConsumedParameters- The parametersroot- The rootcb- The criteria builderexistingPredicate- The existing predicate- Returns:
- A new predicate
-
applyProjections
protected <T> void applyProjections(String projection, PersistentEntityRoot<T> root, PersistentEntityCriteriaUpdate<T> query, PersistentEntityCriteriaBuilder cb) Apply projections.- Type Parameters:
T- The entity type- Parameters:
projection- The querySequenceroot- The rootquery- The querycb- The criteria builder
-
addPropertiesToUpdate
protected <T> void addPropertiesToUpdate(List<io.micronaut.inject.ast.ParameterElement> nonConsumedParameters, MethodMatchContext matchContext, PersistentEntityRoot<T> root, PersistentEntityCriteriaUpdate<T> query, SourcePersistentEntityCriteriaBuilder cb) -
build
- Specified by:
buildin classAbstractCriteriaMethodMatch
-
getOperationType
- Specified by:
getOperationTypein classAbstractCriteriaMethodMatch- Returns:
- The operation type
-