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

public class QueryCriteriaMethodMatch extends AbstractCriteriaMethodMatch
Query criteria method match.
Since:
3.2
  • Constructor Details

    • QueryCriteriaMethodMatch

      public QueryCriteriaMethodMatch(List<MethodNameParser.Match> matches)
      Default constructor.
      Parameters:
      matches - The matches
  • Method Details

    • apply

      protected <T> void apply(MethodMatchContext matchContext, io.micronaut.data.model.jpa.criteria.PersistentEntityRoot<T> root, io.micronaut.data.model.jpa.criteria.PersistentEntityCriteriaQuery<T> query, SourcePersistentEntityCriteriaBuilder cb)
      Apply query match.
      Type Parameters:
      T - The entity type
      Parameters:
      matchContext - The match context
      root - The root
      query - The query
      cb - The criteria builder
    • applyDistinct

      protected <T> void applyDistinct(io.micronaut.data.model.jpa.criteria.PersistentEntityCriteriaQuery<T> query)
      Apply the distinct valu.
      Type Parameters:
      T - The query type
      Parameters:
      query - The query
    • build

      protected MethodMatchInfo build(MethodMatchContext matchContext)
      Specified by:
      build in class AbstractCriteriaMethodMatch
    • applyProjections

      protected <T> void applyProjections(String projectionPart, io.micronaut.data.model.jpa.criteria.PersistentEntityRoot<T> root, io.micronaut.data.model.jpa.criteria.PersistentEntityCriteriaQuery<T> query, io.micronaut.data.model.jpa.criteria.PersistentEntityCriteriaBuilder cb, String returnTypeName)
      Apply projections.
      Type Parameters:
      T - The entity type
      Parameters:
      projectionPart - The projection
      root - The root
      query - The query
      cb - The criteria builder
      returnTypeName - The returnTypeName
    • getOperationType

      protected io.micronaut.data.intercept.annotation.DataMethod.OperationType getOperationType()
      Specified by:
      getOperationType in class AbstractCriteriaMethodMatch
      Returns:
      The operation type