Interface ParameterMapper

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ParameterMapper
Implement this interface when parameters need to be customized based on the connection. We might need to do this to make use of proprietary features, available only with a specific Connection type.
Rod Johnson, Thomas Risberg
See Also:
  • Method Summary

    Modifier and Type
    Create a Map of input parameters, keyed by name.
  • Method Details

    • createMap

      Map<String,?> createMap(Connection con) throws SQLException
      Create a Map of input parameters, keyed by name.
      con - a JDBC connection. This is useful (and the purpose of this interface) if we need to do something RDBMS-specific with a proprietary Connection implementation class. This class conceals such proprietary details. However, it is best to avoid using such proprietary RDBMS features if possible.
      a Map of input parameters, keyed by name (never null)
      SQLException - if an SQLException is encountered setting parameter values (that is, there's no need to catch SQLException)