Class MethodMatchInfo
- java.lang.Object
-
- io.micronaut.data.processor.visitors.finders.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 aDataMethod
annotation which is readable at runtime.- Since:
- 1.0
- Author:
- graemerocher
-
-
Constructor Summary
Constructors Constructor Description MethodMatchInfo(DataMethod.OperationType operationType, io.micronaut.inject.ast.TypedElement resultType, io.micronaut.inject.ast.ClassElement interceptor)
Creates a method info.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addParameterRole(java.lang.CharSequence role, java.lang.String name)
Adds a parameter role.MethodMatchInfo
countQueryResult(QueryResult countQueryResult)
MethodMatchInfo
dto(boolean dto)
MethodMatchInfo
encodeEntityParameters(boolean encodeEntityParameters)
QueryResult
getCountQueryResult()
io.micronaut.inject.ast.ClassElement
getInterceptor()
DataMethod.OperationType
getOperationType()
java.util.Map<java.lang.String,java.lang.String>
getParameterRoles()
QueryResult
getQueryResult()
io.micronaut.inject.ast.TypedElement
getResultType()
The computed result type.io.micronaut.inject.ast.ClassElement
getRuntimeInterceptor()
The runtime interceptor that will handle the method.boolean
isDto()
Is the query result a DTO query.boolean
isEncodeEntityParameters()
boolean
isOptimisticLock()
Gets optimistic lock value.boolean
isRawQuery()
MethodMatchInfo
isRawQuery(boolean isRawQuery)
MethodMatchInfo
optimisticLock(boolean optimisticLock)
MethodMatchInfo
queryResult(QueryResult queryResult)
void
setOptimisticLock(boolean optimisticLock)
Sets optimistic lock value.
-
-
-
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 typeresultType
- The result type, can be null for void etc.interceptor
- The interceptor type to execute at runtime
-
-
Method Detail
-
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(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 namename
- 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
-
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()
-
-