Class MethodMatchInfo


  • public final class MethodMatchInfo
    extends java.lang.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 Detail

      • MethodMatchInfo

        public MethodMatchInfo​(DataMethod.OperationType operationType,
                               @Nullable
                               io.micronaut.inject.ast.TypedElement resultType,
                               @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 Detail

      • 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​(java.lang.CharSequence role,
                                     java.lang.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:
        TypeRole
      • getParameterRoles

        public java.util.Map<java.lang.String,​java.lang.String> getParameterRoles()
        Returns:
        The parameter roles
      • getResultType

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

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

        public MethodMatchInfo encodeEntityParameters​(boolean encodeEntityParameters)
      • optimisticLock

        public MethodMatchInfo optimisticLock​(boolean optimisticLock)
      • getInterceptor

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

        public QueryResult getCountQueryResult()
      • isRawQuery

        public boolean isRawQuery()
      • isEncodeEntityParameters

        public boolean isEncodeEntityParameters()