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. |
| 限定符和类型 | 方法和说明 |
|---|---|
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, getJdbcTemplate, getParsedSql, getPreparedStatementCreator, 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 wrapprotected 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.getPreparedStatementCreatorFactory 在类中 org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplateparsedSql - parsed representation of the given SQL statementparamSource - container of arguments to bindPreparedStatementCreatorFactoryNamedParameterJdbcTemplate.getParsedSql(String)Copyright © 2020. All rights reserved.