Interface ProviderMethodResolver


  • public interface ProviderMethodResolver
    The interface that resolve an SQL provider method via an SQL provider class.

    This interface need to implements at an SQL provider class and it need to define the default constructor for creating a new instance.

    Since:
    3.5.1
    Author:
    Kazuki Shimizu
    • Method Summary

      Modifier and Type Method Description
      default java.lang.reflect.Method resolveMethod​(ProviderContext context)
      Resolve an SQL provider method.
    • Method Detail

      • resolveMethod

        default java.lang.reflect.Method resolveMethod​(ProviderContext context)
        Resolve an SQL provider method.

        The default implementation return a method that matches following conditions.

        • Method name matches with mapper method
        • Return type matches the CharSequence(String, StringBuilder, etc...)
        If matched method is zero or multiple, it throws a BuilderException.
        Parameters:
        context - a context for SQL provider
        Returns:
        an SQL provider method
        Throws:
        BuilderException - Throws when cannot resolve a target method