Annotation Interface SelectProvider


@Documented @Retention(RUNTIME) @Target(METHOD) @Repeatable(SelectProvider.List.class) public @interface SelectProvider
The annotation that specify a method that provide an SQL for retrieving record(s).

How to use:

 public interface UserMapper {

   @SelectProvider(type = SqlProvider.class, method = "selectById")
   User selectById(int id);

   public static class SqlProvider {
     public static String selectById() {
       return "SELECT id, name FROM users WHERE id = #{id}";
     }
   }

 }
 
Author:
Clinton Begin