Annotation Type DataMethod


  • @Retention(RUNTIME)
    @Target({METHOD,ANNOTATION_TYPE})
    @Internal
    @Inherited
    public @interface DataMethod
    Internal annotation used to configure execution handling for io.micronaut.data.intercept.DataIntroductionAdvice.
    Since:
    1.0
    • Field Detail

      • NAME

        static final java.lang.String NAME
        The annotation name.
      • META_MEMBER_EXPANDABLE_QUERY

        static final java.lang.String META_MEMBER_EXPANDABLE_QUERY
        The member that holds expandable query parts.
      • META_MEMBER_EXPANDABLE_COUNT_QUERY

        static final java.lang.String META_MEMBER_EXPANDABLE_COUNT_QUERY
        The member that holds expandable count query parts.
      • META_MEMBER_COUNT_QUERY

        static final java.lang.String META_MEMBER_COUNT_QUERY
        The member that holds the count query.
      • META_MEMBER_RESULT_TYPE

        static final java.lang.String META_MEMBER_RESULT_TYPE
        The member name that holds the result type.
      • META_MEMBER_RESULT_DATA_TYPE

        static final java.lang.String META_MEMBER_RESULT_DATA_TYPE
        The member name that holds the result type.
      • META_MEMBER_ROOT_ENTITY

        static final java.lang.String META_MEMBER_ROOT_ENTITY
        The member name that holds the root entity type.
      • META_MEMBER_INTERCEPTOR

        static final java.lang.String META_MEMBER_INTERCEPTOR
        The member name that holds the interceptor type.
      • META_MEMBER_PARAMETER_BINDING

        static final java.lang.String META_MEMBER_PARAMETER_BINDING
        The member name that holds parameter binding.
      • META_MEMBER_PARAMETER_BINDING_PATHS

        static final java.lang.String META_MEMBER_PARAMETER_BINDING_PATHS
        The member name that holds parameter binding paths.
      • META_MEMBER_PARAMETER_AUTO_POPULATED_PROPERTY_PATHS

        static final java.lang.String META_MEMBER_PARAMETER_AUTO_POPULATED_PROPERTY_PATHS
        The member name that holds parameter auto populated property paths.
      • META_MEMBER_PARAMETER_AUTO_POPULATED_PREVIOUS_PROPERTY_PATHS

        static final java.lang.String META_MEMBER_PARAMETER_AUTO_POPULATED_PREVIOUS_PROPERTY_PATHS
        The member name that holds parameter auto populated property paths.
      • META_MEMBER_PARAMETER_AUTO_POPULATED_PREVIOUS_PROPERTY_INDEXES

        static final java.lang.String META_MEMBER_PARAMETER_AUTO_POPULATED_PREVIOUS_PROPERTY_INDEXES
        The member name that holds parameter auto populated property paths.
      • META_MEMBER_ID_TYPE

        static final java.lang.String META_MEMBER_ID_TYPE
        The ID type.
      • META_MEMBER_PAGE_SIZE

        static final java.lang.String META_MEMBER_PAGE_SIZE
        The parameter that holds the pageSize value.
      • META_MEMBER_PAGE_INDEX

        static final java.lang.String META_MEMBER_PAGE_INDEX
        The parameter that holds the offset value.
      • META_MEMBER_ENTITY

        static final java.lang.String META_MEMBER_ENTITY
        The parameter that references the entity.
      • META_MEMBER_ID

        static final java.lang.String META_MEMBER_ID
        The parameter that references the ID.
      • META_MEMBER_DTO

        static final java.lang.String META_MEMBER_DTO
        Does the query result in a DTO object.
      • META_MEMBER_OPTIMISTIC_LOCK

        static final java.lang.String META_MEMBER_OPTIMISTIC_LOCK
        Does the query contains optimistic lock.
      • META_MEMBER_QUERY_BUILDER

        static final java.lang.String META_MEMBER_QUERY_BUILDER
        The query builder to use.
      • META_MEMBER_RAW_QUERY

        static final java.lang.String META_MEMBER_RAW_QUERY
        Whether the user is a raw user specified query.
      • META_MEMBER_RAW_COUNT_QUERY

        static final java.lang.String META_MEMBER_RAW_COUNT_QUERY
        Whether the user is a raw user specified query.
      • META_MEMBER_PARAMETER_TYPE_DEFS

        static final java.lang.String META_MEMBER_PARAMETER_TYPE_DEFS
        Meta member for storing the parameter type defs.
      • META_MEMBER_PARAMETER_CONVERTERS

        static final java.lang.String META_MEMBER_PARAMETER_CONVERTERS
        Meta member for storing the parameter converters.
      • META_MEMBER_PARAMETERS

        static final java.lang.String META_MEMBER_PARAMETERS
        Meta member for storing the parameters.
      • META_MEMBER_OPERATION_TYPE

        static final java.lang.String META_MEMBER_OPERATION_TYPE
        The member name that holds the root entity type.
    • Element Detail

      • interceptor

        java.lang.Class<? extends DataInterceptor> interceptor
        Returns:
        The child interceptor to use for the method execution.
      • rootEntity

        java.lang.Class<?> rootEntity
        The root entity this method applies to.
        Returns:
        The root entity
        Default:
        void.class
      • resultType

        java.lang.Class<?> resultType
        The computed result type. This represents the type that is to be read from the database. For example for a List this would return the value of the generic type parameter E. 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
      • idType

        java.lang.Class<?> idType
        The identifier type for the method being executed.
        Returns:
        The ID type
        Default:
        java.io.Serializable.class
      • parameterBinding

        io.micronaut.context.annotation.Property[] parameterBinding
        The parameter binding defines which method arguments bind to which query parameters. The Property.name() is used to define the query parameter name and the Property.value() is used to define method argument name to bind.
        Returns:
        The parameter binding.
        Default:
        {}
      • pageable

        java.lang.String pageable
        The argument that defines the pageable object.
        Returns:
        The pageable.
        Default:
        ""
      • entity

        java.lang.String entity
        The argument that represents the entity for save, update, query by example operations etc.
        Returns:
        The entity argument
        Default:
        ""
      • id

        java.lang.String id
        The member that defines the ID for lookup, delete, update by ID.
        Returns:
        The ID
        Default:
        ""
      • pageSize

        int pageSize
        An explicit pageSize (in absence of a pageable).
        Returns:
        The pageSize
        Default:
        -1
      • pageIndex

        long pageIndex
        An explicit offset (in absence of a pageable).
        Returns:
        The offset
        Default:
        0L