Annotation Type DataMethod
-
@Retention(RUNTIME) @Target({METHOD,ANNOTATION_TYPE}) @Internal @Inherited public @interface DataMethodInternal annotation used to configure execution handling forDataIntroductionAdvice.- Since:
- 1.0
- Author:
- graemerocher
-
-
Field Summary
Fields Modifier and Type Fields Description static java.lang.StringMETA_MEMBER_COUNT_QUERYThe member that holds the count query.static java.lang.StringMETA_MEMBER_DTODoes the query result in a DTO object.static java.lang.StringMETA_MEMBER_ENTITYThe parameter that references the entity.static java.lang.StringMETA_MEMBER_EXPANDABLE_COUNT_QUERYThe member that holds expandable count query parts.static java.lang.StringMETA_MEMBER_EXPANDABLE_QUERYThe member that holds expandable query parts.static java.lang.StringMETA_MEMBER_IDThe parameter that references the ID.static java.lang.StringMETA_MEMBER_ID_TYPEThe ID type.static java.lang.StringMETA_MEMBER_INTERCEPTORThe member name that holds the interceptor type.static java.lang.StringMETA_MEMBER_OPERATION_TYPEThe member name that holds the root entity type.static java.lang.StringMETA_MEMBER_OPTIMISTIC_LOCKDoes the query contains optimistic lock.static java.lang.StringMETA_MEMBER_PAGE_INDEXThe parameter that holds the offset value.static java.lang.StringMETA_MEMBER_PAGE_SIZEThe parameter that holds the pageSize value.static java.lang.StringMETA_MEMBER_PARAMETER_AUTO_POPULATED_PREVIOUS_PROPERTY_INDEXESThe member name that holds parameter auto populated property paths.static java.lang.StringMETA_MEMBER_PARAMETER_AUTO_POPULATED_PREVIOUS_PROPERTY_PATHSThe member name that holds parameter auto populated property paths.static java.lang.StringMETA_MEMBER_PARAMETER_AUTO_POPULATED_PROPERTY_PATHSThe member name that holds parameter auto populated property paths.static java.lang.StringMETA_MEMBER_PARAMETER_BINDINGThe member name that holds parameter binding.static java.lang.StringMETA_MEMBER_PARAMETER_BINDING_PATHSThe member name that holds parameter binding paths.static java.lang.StringMETA_MEMBER_PARAMETER_CONVERTERSMeta member for storing the parameter converters.static java.lang.StringMETA_MEMBER_PARAMETER_TYPE_DEFSMeta member for storing the parameter type defs.static java.lang.StringMETA_MEMBER_PARAMETERSMeta member for storing the parameters.static java.lang.StringMETA_MEMBER_QUERY_BUILDERThe query builder to use.static java.lang.StringMETA_MEMBER_RAW_COUNT_QUERYWhether the user is a raw user specified query.static java.lang.StringMETA_MEMBER_RAW_QUERYWhether the user is a raw user specified query.static java.lang.StringMETA_MEMBER_RESULT_DATA_TYPEThe member name that holds the result type.static java.lang.StringMETA_MEMBER_RESULT_TYPEThe member name that holds the result type.static java.lang.StringMETA_MEMBER_ROOT_ENTITYThe member name that holds the root entity type.static java.lang.StringNAMEThe 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.StringentityThe argument that represents the entity for save, update, query by example operations etc.java.lang.StringidThe member that defines the ID for lookup, delete, update by ID.java.lang.Class<?>idTypeThe identifier type for the method being executed.java.lang.StringpageableThe argument that defines the pageable object.longpageIndexAn explicit offset (in absence of a pageable).intpageSizeAn explicit pageSize (in absence of a pageable).io.micronaut.context.annotation.Property[]parameterBindingThe parameter binding defines which method arguments bind to which query parameters.DataMethodQueryParameter[]parametersDataTyperesultDataTypejava.lang.Class<?>resultTypeThe computed result type.java.lang.Class<?>rootEntityThe 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 aListthis 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:
- {}
-
-