Class ParamNameResolver

java.lang.Object
org.apache.ibatis.reflection.ParamNameResolver

public class ParamNameResolver extends Object
  • Field Details

    • GENERIC_NAME_PREFIX

      public static final String GENERIC_NAME_PREFIX
      See Also:
    • GENERIC_NAME_CACHE

      public static final String[] GENERIC_NAME_CACHE
  • Constructor Details

  • Method Details

    • getNames

      public String[] getNames()
      Returns parameter names referenced by SQL providers.
      Returns:
      the names
    • getNamedParams

      public Object getNamedParams(Object[] args)

      A single non-special parameter is returned without a name. Multiple parameters are named using the naming rule. In addition to the default names, this method also adds the generic names (param1, param2, ...).

      Parameters:
      args - the args
      Returns:
      the named params
    • wrapToMapIfCollection

      public static Object wrapToMapIfCollection(Object object, String actualParamName)
      Wrap to a MapperMethod.ParamMap if object is Collection or array.
      Parameters:
      object - a parameter object
      actualParamName - an actual parameter name (If specify a name, set an object to MapperMethod.ParamMap with specified name)
      Returns:
      a MapperMethod.ParamMap
      Since:
      3.5.5