Top Description Methods
org.springframework.jdbc.core

public Interface ParameterMapper

Annotations
@FunctionalInterface
Imports
java.sql.Connection, .SQLException, java.util.Map

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.
Authors
Rod Johnson, Thomas Risberg
See Also
CallableStatementCreatorFactory#newCallableStatementCreator(ParameterMapper), org.springframework.jdbc.object.StoredProcedure#execute(ParameterMapper)

Method Summary

Modifier and TypeMethod and Description
public Map<String, ?>

Returns:

a Map of input parameters, keyed by name (never null)
createMap
(Connection
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.
con
)

Create a Map of input parameters, keyed by name.

Method Detail

createMapback to summary
public Map<String, ?> createMap(Connection con) throws SQLException

Create a Map of input parameters, keyed by name.

Parameters
con:Connection

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.

Returns:Map<String, ?>

a Map of input parameters, keyed by name (never null)

Exceptions
SQLException:
if an SQLException is encountered setting parameter values (that is, there's no need to catch SQLException)