Class NamedParameterJdbcTemplate

All Implemented Interfaces:

public class NamedParameterJdbcTemplate extends Object implements NamedParameterJdbcOperations
Template class with a basic set of JDBC operations, allowing the use of named parameters rather than traditional '?' placeholders.

This class delegates to a wrapped JdbcTemplate once the substitution from named parameters to JDBC style '?' placeholders is done at execution time. It also allows for expanding a List of values to the appropriate number of placeholders.

An instance of this template class is thread-safe once configured. The underlying JdbcTemplate is exposed to allow for convenient access to the traditional JdbcTemplate methods.

NOTE: As of 6.1, there is a unified JDBC access facade available in the form of JdbcClient. JdbcClient provides a fluent API style for common JDBC queries/updates with flexible use of indexed or named parameters. It delegates to a JdbcTemplate/NamedParameterJdbcTemplate for actual execution.

Thomas Risberg, Juergen Hoeller
See Also: