Annotation Type DataMethod
-
@Retention(RUNTIME) @Target({METHOD,ANNOTATION_TYPE}) @Internal @Inherited public @interface DataMethod
Internal annotation used to configure execution handling forDataIntroductionAdvice
.- Since:
- 1.0
- Author:
- graemerocher
-
-
Field Summary
Fields Modifier and Type Fields Description static java.lang.String
META_MEMBER_COUNT_QUERY
The member that holds the count query.static java.lang.String
META_MEMBER_DTO
Does the query result in a DTO object.static java.lang.String
META_MEMBER_ENTITY
The parameter that references the entity.static java.lang.String
META_MEMBER_EXPANDABLE_COUNT_QUERY
The member that holds expandable count query parts.static java.lang.String
META_MEMBER_EXPANDABLE_QUERY
The member that holds expandable query parts.static java.lang.String
META_MEMBER_ID
The parameter that references the ID.static java.lang.String
META_MEMBER_ID_TYPE
The ID type.static java.lang.String
META_MEMBER_INTERCEPTOR
The member name that holds the interceptor type.static java.lang.String
META_MEMBER_OPERATION_TYPE
The member name that holds the root entity type.static java.lang.String
META_MEMBER_OPTIMISTIC_LOCK
Does the query contains optimistic lock.static java.lang.String
META_MEMBER_PAGE_INDEX
The parameter that holds the offset value.static java.lang.String
META_MEMBER_PAGE_SIZE
The parameter that holds the pageSize value.static java.lang.String
META_MEMBER_PARAMETER_AUTO_POPULATED_PREVIOUS_PROPERTY_INDEXES
The member name that holds parameter auto populated property paths.static java.lang.String
META_MEMBER_PARAMETER_AUTO_POPULATED_PREVIOUS_PROPERTY_PATHS
The member name that holds parameter auto populated property paths.static java.lang.String
META_MEMBER_PARAMETER_AUTO_POPULATED_PROPERTY_PATHS
The member name that holds parameter auto populated property paths.static java.lang.String
META_MEMBER_PARAMETER_BINDING
The member name that holds parameter binding.static java.lang.String
META_MEMBER_PARAMETER_BINDING_PATHS
The member name that holds parameter binding paths.static java.lang.String
META_MEMBER_PARAMETER_CONVERTERS
Meta member for storing the parameter converters.static java.lang.String
META_MEMBER_PARAMETER_TYPE_DEFS
Meta member for storing the parameter type defs.static java.lang.String
META_MEMBER_PARAMETERS
Meta member for storing the parameters.static java.lang.String
META_MEMBER_QUERY_BUILDER
The query builder to use.static java.lang.String
META_MEMBER_RAW_COUNT_QUERY
Whether the user is a raw user specified query.static java.lang.String
META_MEMBER_RAW_QUERY
Whether the user is a raw user specified query.static java.lang.String
META_MEMBER_RESULT_DATA_TYPE
The member name that holds the result type.static java.lang.String
META_MEMBER_RESULT_TYPE
The member name that holds the result type.static java.lang.String
META_MEMBER_ROOT_ENTITY
The member name that holds the root entity type.static java.lang.String
NAME
The annotation name.
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.Class<? extends DataInterceptor>
interceptor
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String
entity
The argument that represents the entity for save, update, query by example operations etc.java.lang.String
id
The member that defines the ID for lookup, delete, update by ID.java.lang.Class<?>
idType
The identifier type for the method being executed.java.lang.String
pageable
The argument that defines the pageable object.long
pageIndex
An explicit offset (in absence of a pageable).int
pageSize
An explicit pageSize (in absence of a pageable).io.micronaut.context.annotation.Property[]
parameterBinding
The parameter binding defines which method arguments bind to which query parameters.DataMethodQueryParameter[]
parameters
DataType
resultDataType
java.lang.Class<?>
resultType
The computed result type.java.lang.Class<?>
rootEntity
The root entity this method applies to.
-
-
-
Element Detail
-
interceptor
java.lang.Class<? extends DataInterceptor> interceptor
- Returns:
- The child interceptor to use for the method execution.
-
-
-
resultType
java.lang.Class<?> resultType
The computed result type. This represents the type that is to be read from the database. For example for aList
this would return the value of the generic type parameterE
. Or for an entity result the return type itself.- Returns:
- The result type
- Default:
- void.class
-
-
-
resultDataType
DataType resultDataType
- Returns:
- The result data type.
- Default:
- io.micronaut.data.model.DataType.OBJECT
-
-
-
parameterBinding
io.micronaut.context.annotation.Property[] parameterBinding
The parameter binding defines which method arguments bind to which query parameters. TheProperty.name()
is used to define the query parameter name and theProperty.value()
is used to define method argument name to bind.- Returns:
- The parameter binding.
- Default:
- {}
-
-
-
parameters
DataMethodQueryParameter[] parameters
- Returns:
- The query parameters
- Default:
- {}
-
-