Annotation Type SelectProvider


  • @Documented
    @Retention(RUNTIME)
    @Target(METHOD)
    public @interface SelectProvider
    Author:
    Clinton Begin
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.Class<?> type
      Specify a type that implements an SQL provider method.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String method
      Specify a method for providing an SQL.
    • Element Detail

      • type

        java.lang.Class<?> type
        Specify a type that implements an SQL provider method.
        Returns:
        a type that implements an SQL provider method
      • method

        java.lang.String method
        Specify a method for providing an SQL.

        Since 3.5.1, this attribute can omit. If this attribute omit, the MyBatis will call a method that decide by following rules.

        • If class that specified the type() attribute implements the ProviderMethodResolver, the MyBatis use a method that returned by it
        • If cannot resolve a method by ProviderMethodResolver(= not implement it or it was returned null), the MyBatis will search and use a fallback method that named provideSql from specified type
        Returns:
        a method name of method for providing an SQL
        Default:
        ""