public class NamedParameterJdbcTemplate
extends org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
| 构造器和说明 |
|---|
NamedParameterJdbcTemplate(DataSource dataSource) |
NamedParameterJdbcTemplate(org.springframework.jdbc.core.JdbcOperations classicJdbcTemplate)
Create a new NamedParameterJdbcTemplate for the given classic
Spring
JdbcTemplate. |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.jdbc.core.JdbcTemplate |
getJdbcTemplate()
Expose the classic Spring
JdbcTemplate itself, if available,
in particular for passing it on to other JdbcTemplate consumers. |
protected org.springframework.jdbc.core.PreparedStatementCreator |
getPreparedStatementCreator(String sql,
org.springframework.jdbc.core.namedparam.SqlParameterSource paramSource)
Build a
PreparedStatementCreator based on the given SQL and named parameters. |
protected org.springframework.jdbc.core.PreparedStatementCreatorFactory |
getPreparedStatementCreatorFactory(org.springframework.jdbc.core.namedparam.ParsedSql parsedSql,
org.springframework.jdbc.core.namedparam.SqlParameterSource paramSource)
Build a
PreparedStatementCreatorFactory based on the given SQL and named parameters. |
batchUpdate, batchUpdate, execute, execute, execute, getCacheLimit, getJdbcOperations, getParsedSql, query, query, query, query, query, query, query, query, query, queryForList, queryForList, queryForList, queryForList, queryForMap, queryForMap, queryForObject, queryForObject, queryForObject, queryForObject, queryForRowSet, queryForRowSet, setCacheLimit, update, update, update, updatepublic NamedParameterJdbcTemplate(DataSource dataSource)
public NamedParameterJdbcTemplate(org.springframework.jdbc.core.JdbcOperations classicJdbcTemplate)
JdbcTemplate.classicJdbcTemplate - the classic Spring JdbcTemplate to wrappublic org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate()
JdbcTemplate itself, if available,
in particular for passing it on to other JdbcTemplate consumers.
If sufficient for the purposes at hand, NamedParameterJdbcTemplate.getJdbcOperations()
is recommended over this variant.
protected org.springframework.jdbc.core.PreparedStatementCreator getPreparedStatementCreator(String sql, org.springframework.jdbc.core.namedparam.SqlParameterSource paramSource)
PreparedStatementCreator based on the given SQL and named parameters.
Note: Directly called from all query variants.
Not used for the update variant with generated key handling.
getPreparedStatementCreator 在类中 org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplatesql - the SQL statement to executeparamSource - container of arguments to bindPreparedStatementCreatorprotected org.springframework.jdbc.core.PreparedStatementCreatorFactory getPreparedStatementCreatorFactory(org.springframework.jdbc.core.namedparam.ParsedSql parsedSql,
org.springframework.jdbc.core.namedparam.SqlParameterSource paramSource)
PreparedStatementCreatorFactory based on the given SQL and named parameters.parsedSql - parsed representation of the given SQL statementparamSource - container of arguments to bindPreparedStatementCreatorFactoryNamedParameterJdbcTemplate.getParsedSql(String)Copyright © 2021. All rights reserved.