Annotation Interface DataMethod
@Retention(RUNTIME)
@Target({METHOD,ANNOTATION_TYPE})
@Internal
@Inherited
public @interface DataMethod
Internal annotation used to configure execution handling for io.micronaut.data.runtime.intercept.DataIntroductionAdvice.
- Since:
- 1.0
- Author:
- graemerocher
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumDescribes the operation type.
- 
Required Element SummaryRequired Elements
- 
Optional Element SummaryOptional ElementsModifier and TypeOptional ElementDescriptionThe argument that represents the entity for save, update, query by example operations etc.The member that defines the ID for lookup, delete, update by ID.Class<?>The identifier type for the method being executed.The argument that defines the pageable object.longAn explicit offset (in absence of a pageable).intAn explicit pageSize (in absence of a pageable).io.micronaut.context.annotation.Property[]The parameter binding defines which method arguments bind to which query parameters.Class<?>The computed result type.Class<?>The root entity this method applies to.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe member that holds the count query.static final StringDoes the query result in a DTO object.static final StringThe parameter that references the entity.static final StringThe member that holds expandable count query parts.static final StringThe member that holds expandable query parts.static final StringThe parameter that references the ID.static final StringThe ID type.static final StringThe member name that holds the interceptor type.static final StringThe member name that holds the root entity type.static final StringDoes the query contains optimistic lock.static final StringThe parameter that holds the offset value.static final StringThe parameter that holds the pageSize value.static final StringThe member name that holds parameter auto populated property paths.static final StringThe member name that holds parameter auto populated property paths.static final StringThe member name that holds parameter auto populated property paths.static final StringThe member name that holds parameter binding.static final StringThe member name that holds parameter binding paths.static final StringMeta member for storing the parameter converters.static final StringMeta member for storing the parameter type defs.static final StringMeta member for storing the parameters.static final StringThe query builder to use.static final StringWhether the user is a raw user specified query.static final StringWhether the user is a raw user specified query.static final StringThe member name that holds the result type.static final StringThe member name that holds the result type.static final StringThe member name that holds the root entity type.static final StringThe annotation name.
- 
Field Details- 
NAMEThe annotation name.
- 
META_MEMBER_EXPANDABLE_QUERYThe member that holds expandable query parts.- See Also:
 
- 
META_MEMBER_EXPANDABLE_COUNT_QUERYThe member that holds expandable count query parts.- See Also:
 
- 
META_MEMBER_COUNT_QUERYThe member that holds the count query.- See Also:
 
- 
META_MEMBER_RESULT_TYPEThe member name that holds the result type.- See Also:
 
- 
META_MEMBER_RESULT_DATA_TYPEThe member name that holds the result type.- See Also:
 
- 
META_MEMBER_ROOT_ENTITYThe member name that holds the root entity type.- See Also:
 
- 
META_MEMBER_INTERCEPTORThe member name that holds the interceptor type.- See Also:
 
- 
META_MEMBER_PARAMETER_BINDINGThe member name that holds parameter binding.- See Also:
 
- 
META_MEMBER_PARAMETER_BINDING_PATHSThe member name that holds parameter binding paths.- See Also:
 
- 
META_MEMBER_PARAMETER_AUTO_POPULATED_PROPERTY_PATHSThe member name that holds parameter auto populated property paths.- See Also:
 
- 
META_MEMBER_PARAMETER_AUTO_POPULATED_PREVIOUS_PROPERTY_PATHSThe member name that holds parameter auto populated property paths.- See Also:
 
- 
META_MEMBER_PARAMETER_AUTO_POPULATED_PREVIOUS_PROPERTY_INDEXESThe member name that holds parameter auto populated property paths.- See Also:
 
- 
META_MEMBER_ID_TYPEThe ID type.- See Also:
 
- 
META_MEMBER_PAGE_SIZEThe parameter that holds the pageSize value.- See Also:
 
- 
META_MEMBER_PAGE_INDEXThe parameter that holds the offset value.- See Also:
 
- 
META_MEMBER_ENTITYThe parameter that references the entity.- See Also:
 
- 
META_MEMBER_IDThe parameter that references the ID.- See Also:
 
- 
META_MEMBER_DTODoes the query result in a DTO object.- See Also:
 
- 
META_MEMBER_OPTIMISTIC_LOCKDoes the query contains optimistic lock.- See Also:
 
- 
META_MEMBER_QUERY_BUILDERThe query builder to use.- See Also:
 
- 
META_MEMBER_RAW_QUERYWhether the user is a raw user specified query.- See Also:
 
- 
META_MEMBER_RAW_COUNT_QUERYWhether the user is a raw user specified query.- See Also:
 
- 
META_MEMBER_PARAMETER_TYPE_DEFSMeta member for storing the parameter type defs.- See Also:
 
- 
META_MEMBER_PARAMETER_CONVERTERSMeta member for storing the parameter converters.- See Also:
 
- 
META_MEMBER_PARAMETERSMeta member for storing the parameters.- See Also:
 
- 
META_MEMBER_OPERATION_TYPEThe member name that holds the root entity type.- See Also:
 
 
- 
- 
Element Details- 
interceptorClass<? extends DataInterceptor> interceptor- Returns:
- The child interceptor to use for the method execution.
 
 
- 
- 
- 
rootEntityClass<?> rootEntityThe root entity this method applies to.- Returns:
- The root entity
 - Default:
- void.class
 
- 
resultTypeClass<?> resultTypeThe 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
 
- 
resultDataTypeDataType resultDataType- Returns:
- The result data type.
 - Default:
- OBJECT
 
- 
idTypeClass<?> idTypeThe identifier type for the method being executed.- Returns:
- The ID type
 - Default:
- java.io.Serializable.class
 
- 
parameterBindingio.micronaut.context.annotation.Property[] parameterBindingThe 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:
- {}
 
- 
pageableString pageableThe argument that defines the pageable object.- Returns:
- The pageable.
 - Default:
- ""
 
- 
entityString entityThe argument that represents the entity for save, update, query by example operations etc.- Returns:
- The entity argument
 - Default:
- ""
 
- 
idString idThe member that defines the ID for lookup, delete, update by ID.- Returns:
- The ID
 - Default:
- ""
 
- 
pageSizeint pageSizeAn explicit pageSize (in absence of a pageable).- Returns:
- The pageSize
 - Default:
- -1
 
- 
pageIndexlong pageIndexAn explicit offset (in absence of a pageable).- Returns:
- The offset
 - Default:
- 0L
 
- 
parametersDataMethodQueryParameter[] parameters- Returns:
- The query parameters
 - Default:
- {}
 
 
-