Package | Description |
---|---|
org.springframework.jdbc.core |
Provides the core JDBC framework, based on JdbcTemplate
and its associated callback interfaces and helper objects.
|
org.springframework.jdbc.core.namedparam |
JdbcTemplate variant with named parameter support.
|
org.springframework.jdbc.object |
The classes in this package represent RDBMS queries, updates,
and stored procedures as threadsafe, reusable objects.
|
Modifier and Type | Method and Description |
---|---|
PreparedStatementCreator |
PreparedStatementCreatorFactory.newPreparedStatementCreator(List<?> params)
Return a new PreparedStatementCreator for the given parameters.
|
PreparedStatementCreator |
PreparedStatementCreatorFactory.newPreparedStatementCreator(Object[] params)
Return a new PreparedStatementCreator for the given parameters.
|
PreparedStatementCreator |
PreparedStatementCreatorFactory.newPreparedStatementCreator(String sqlToUse,
Object[] params)
Return a new PreparedStatementCreator for the given parameters.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
JdbcOperations.execute(PreparedStatementCreator psc,
PreparedStatementCallback<T> action)
Execute a JDBC data access operation, implemented as callback action
working on a JDBC PreparedStatement.
|
<T> T |
JdbcTemplate.execute(PreparedStatementCreator psc,
PreparedStatementCallback<T> action) |
<T> T |
JdbcTemplate.query(PreparedStatementCreator psc,
PreparedStatementSetter pss,
ResultSetExtractor<T> rse)
Query using a prepared statement, allowing for a PreparedStatementCreator
and a PreparedStatementSetter.
|
<T> T |
JdbcOperations.query(PreparedStatementCreator psc,
ResultSetExtractor<T> rse)
Query using a prepared statement, reading the ResultSet with a ResultSetExtractor.
|
<T> T |
JdbcTemplate.query(PreparedStatementCreator psc,
ResultSetExtractor<T> rse) |
void |
JdbcOperations.query(PreparedStatementCreator psc,
RowCallbackHandler rch)
Query using a prepared statement, reading the ResultSet on a per-row basis
with a RowCallbackHandler.
|
void |
JdbcTemplate.query(PreparedStatementCreator psc,
RowCallbackHandler rch) |
<T> List<T> |
JdbcOperations.query(PreparedStatementCreator psc,
RowMapper<T> rowMapper)
Query using a prepared statement, mapping each row to a result object
via a RowMapper.
|
<T> List<T> |
JdbcTemplate.query(PreparedStatementCreator psc,
RowMapper<T> rowMapper) |
<T> Stream<T> |
JdbcTemplate.queryForStream(PreparedStatementCreator psc,
PreparedStatementSetter pss,
RowMapper<T> rowMapper)
Query using a prepared statement, allowing for a PreparedStatementCreator
and a PreparedStatementSetter.
|
<T> Stream<T> |
JdbcOperations.queryForStream(PreparedStatementCreator psc,
RowMapper<T> rowMapper)
Query using a prepared statement, mapping each row to a result object
via a RowMapper, and turning it into an iterable and closeable Stream.
|
<T> Stream<T> |
JdbcTemplate.queryForStream(PreparedStatementCreator psc,
RowMapper<T> rowMapper) |
int |
JdbcOperations.update(PreparedStatementCreator psc)
Issue a single SQL update operation (such as an insert, update or delete
statement) using a PreparedStatementCreator to provide SQL and any
required parameters.
|
int |
JdbcTemplate.update(PreparedStatementCreator psc) |
int |
JdbcOperations.update(PreparedStatementCreator psc,
KeyHolder generatedKeyHolder)
Issue an update statement using a PreparedStatementCreator to provide SQL and
any required parameters.
|
int |
JdbcTemplate.update(PreparedStatementCreator psc,
KeyHolder generatedKeyHolder) |
protected int |
JdbcTemplate.update(PreparedStatementCreator psc,
PreparedStatementSetter pss) |
Modifier and Type | Method and Description |
---|---|
protected PreparedStatementCreator |
NamedParameterJdbcTemplate.getPreparedStatementCreator(String sql,
SqlParameterSource paramSource)
Build a
PreparedStatementCreator based on the given SQL and named parameters. |
protected PreparedStatementCreator |
NamedParameterJdbcTemplate.getPreparedStatementCreator(String sql,
SqlParameterSource paramSource,
Consumer<PreparedStatementCreatorFactory> customizer)
Build a
PreparedStatementCreator based on the given SQL and named parameters. |
Modifier and Type | Method and Description |
---|---|
protected PreparedStatementCreator |
SqlOperation.newPreparedStatementCreator(Object[] params)
Return a PreparedStatementCreator to perform an operation
with the given parameters.
|
protected PreparedStatementCreator |
SqlOperation.newPreparedStatementCreator(String sqlToUse,
Object[] params)
Return a PreparedStatementCreator to perform an operation
with the given parameters.
|