Annotation Type ConstructorArgs


  • @Documented
    @Retention(RUNTIME)
    @Target(METHOD)
    public @interface ConstructorArgs
    The annotation that be grouping mapping definitions for constructor.


    How to use:

     public interface UserMapper {
       @ConstructorArgs({
         @Arg(column = "id", javaType = int.class, id = true),
         @Arg(column = "name", javaType = String.class),
         @Arg(javaType = UserEmail.class, select = "selectUserEmailById", column = "id")
       })
       @Select("SELECT id, name FROM users WHERE id = #{id}")
       User selectById(int id);
     }
     
    Author:
    Clinton Begin
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      Arg[] value
      Returns mapping definitions for constructor.
    • Element Detail

      • value

        Arg[] value
        Returns mapping definitions for constructor.
        Returns:
        mapping definitions
        Default:
        {}