Annotation Type Results


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

    How to use:

     public interface UserMapper {
       @Results({
         @Result(property = "id", column = "id", id = true),
         @Result(property = "name", column = "name"),
         @Result(property = "email" column = "id", one = @One(select = "selectUserEmailById", fetchType = FetchType.LAZY)),
         @Result(property = "telephoneNumbers" column = "id", many = @Many(select = "selectAllUserTelephoneNumberById", fetchType = FetchType.LAZY))
       })
       @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
      String id
      Returns the id of this result map.
      Result[] value
      Returns mapping definitions for property.
    • Element Detail

      • id

        String id
        Returns the id of this result map.
        Returns:
        the id of this result map
        Default:
        ""
      • value

        Result[] value
        Returns mapping definitions for property.
        Returns:
        mapping definitions
        Default:
        {}