接口 ParameterMapper
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
@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
- 另请参阅:
CallableStatementCreatorFactory.newCallableStatementCreator(ParameterMapper)
,StoredProcedure.execute(ParameterMapper)
方法详细资料
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)