Class MethodMatchInfo

java.lang.Object
io.micronaut.data.processor.visitors.finders.MethodMatchInfo

public final class MethodMatchInfo extends Object
The method info. This class describes the pre-computed method handling for a repository and is computed into a DataMethod annotation which is readable at runtime.
Since:
1.0
Author:
graemerocher
  • Constructor Details

    • MethodMatchInfo

      public MethodMatchInfo(DataMethod.OperationType operationType, @Nullable @Nullable io.micronaut.inject.ast.TypedElement resultType, @Nullable @Nullable io.micronaut.inject.ast.ClassElement interceptor)
      Creates a method info.
      Parameters:
      operationType - The operation type
      resultType - The result type, can be null for void etc.
      interceptor - The interceptor type to execute at runtime
  • Method Details

    • getOperationType

      public DataMethod.OperationType getOperationType()
      Returns:
      The operation type
    • isDto

      public boolean isDto()
      Is the query result a DTO query.
      Returns:
      True if it is
    • isOptimisticLock

      public boolean isOptimisticLock()
      Gets optimistic lock value.
      Returns:
      the value
    • setOptimisticLock

      public void setOptimisticLock(boolean optimisticLock)
      Sets optimistic lock value.
      Parameters:
      optimisticLock - new value
    • addParameterRole

      public void addParameterRole(CharSequence role, String name)
      Adds a parameter role. This indicates that a parameter is involved somehow in the query.
      Parameters:
      role - The role name
      name - The parameter
      See Also:
    • getParameterRoles

      public Map<String,String> getParameterRoles()
      Returns:
      The parameter roles
    • getResultType

      @Nullable public @Nullable io.micronaut.inject.ast.TypedElement getResultType()
      The computed result type.
      Returns:
      The result type.
    • getRuntimeInterceptor

      @Nullable public @Nullable io.micronaut.inject.ast.ClassElement getRuntimeInterceptor()
      The runtime interceptor that will handle the method.
      Returns:
      The runtime interceptor
    • dto

      public MethodMatchInfo dto(boolean dto)
    • queryResult

      public MethodMatchInfo queryResult(QueryResult queryResult)
    • countQueryResult

      public MethodMatchInfo countQueryResult(QueryResult countQueryResult)
    • isRawQuery

      public MethodMatchInfo isRawQuery(boolean isRawQuery)
    • encodeEntityParameters

      public MethodMatchInfo encodeEntityParameters(boolean encodeEntityParameters)
    • optimisticLock

      public MethodMatchInfo optimisticLock(boolean optimisticLock)
    • getInterceptor

      public io.micronaut.inject.ast.ClassElement getInterceptor()
    • getQueryResult

      public QueryResult getQueryResult()
    • getCountQueryResult

      public QueryResult getCountQueryResult()
    • isRawQuery

      public boolean isRawQuery()
    • isEncodeEntityParameters

      public boolean isEncodeEntityParameters()