|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IterableNamedParameterJdbcOperations
Extension interface for NamedParameterJdbcOperations
. All methods, that return List
mirrored with queryForIter
methods that return CloseableIterator
.
Javadocs borrowed from NamedParameterJdbcOperations
.
Method Summary | ||
---|---|---|
IterableJdbcOperations |
getIterableJdbcOperations()
Expose IterableJdbcTemplate to allow queries without named parameters |
|
CloseableIterator<Map<String,Object>> |
queryForIter(String sql,
Map<String,?> paramMap)
Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result list. |
|
|
queryForIter(String sql,
Map<String,?> paramMap,
Class<T> elementType)
Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result list. |
|
|
queryForIter(String sql,
Map<String,?> paramMap,
org.springframework.jdbc.core.RowMapper<T> rowMapper)
Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, mapping each row to a Java object via a RowMapper. |
|
CloseableIterator<Map<String,Object>> |
queryForIter(String sql,
org.springframework.jdbc.core.namedparam.SqlParameterSource paramSource)
Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result list. |
|
|
queryForIter(String sql,
org.springframework.jdbc.core.namedparam.SqlParameterSource paramSource,
Class<T> elementType)
Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result list. |
|
|
queryForIter(String sql,
org.springframework.jdbc.core.namedparam.SqlParameterSource paramSource,
org.springframework.jdbc.core.RowMapper<T> rowMapper)
Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, mapping each row to a Java object via a RowMapper. |
Method Detail |
---|
IterableJdbcOperations getIterableJdbcOperations()
<T> CloseableIterator<T> queryForIter(String sql, org.springframework.jdbc.core.namedparam.SqlParameterSource paramSource, org.springframework.jdbc.core.RowMapper<T> rowMapper) throws org.springframework.dao.DataAccessException
sql
- SQL query to executeparamSource
- container of arguments to bind to the queryrowMapper
- object that will map one object per row
org.springframework.dao.DataAccessException
- if the query fails<T> CloseableIterator<T> queryForIter(String sql, Map<String,?> paramMap, org.springframework.jdbc.core.RowMapper<T> rowMapper) throws org.springframework.dao.DataAccessException
sql
- SQL query to executeparamMap
- map of parameters to bind to the query
(leaving it to the PreparedStatement to guess the corresponding SQL type)rowMapper
- object that will map one object per row
org.springframework.dao.DataAccessException
- if the query fails<T> CloseableIterator<T> queryForIter(String sql, org.springframework.jdbc.core.namedparam.SqlParameterSource paramSource, Class<T> elementType) throws org.springframework.dao.DataAccessException
The results will be mapped to a List (one entry for each row) of result objects, each of them matching the specified element type.
sql
- SQL query to executeparamSource
- container of arguments to bind to the queryelementType
- the required type of element in the result list
(for example, Integer.class
)
org.springframework.dao.DataAccessException
- if the query failsJdbcTemplate.queryForList(String, Class)
,
SingleColumnRowMapper
<T> CloseableIterator<T> queryForIter(String sql, Map<String,?> paramMap, Class<T> elementType) throws org.springframework.dao.DataAccessException
The results will be mapped to a List (one entry for each row) of result objects, each of them matching the specified element type.
sql
- SQL query to executeparamMap
- map of parameters to bind to the query
(leaving it to the PreparedStatement to guess the corresponding SQL type)elementType
- the required type of element in the result list
(for example, Integer.class
)
org.springframework.dao.DataAccessException
- if the query failsJdbcTemplate.queryForList(String, Class)
,
SingleColumnRowMapper
CloseableIterator<Map<String,Object>> queryForIter(String sql, org.springframework.jdbc.core.namedparam.SqlParameterSource paramSource) throws org.springframework.dao.DataAccessException
The results will be mapped to a List (one entry for each row) of Maps (one entry for each column, using the column name as the key). Thus Each element in the list will be of the form returned by this interface's queryForMap() methods.
sql
- SQL query to executeparamSource
- container of arguments to bind to the query
org.springframework.dao.DataAccessException
- if the query failsJdbcTemplate.queryForList(String)
CloseableIterator<Map<String,Object>> queryForIter(String sql, Map<String,?> paramMap) throws org.springframework.dao.DataAccessException
The results will be mapped to a List (one entry for each row) of Maps (one entry for each column, using the column name as the key). Each element in the list will be of the form returned by this interface's queryForMap() methods.
sql
- SQL query to executeparamMap
- map of parameters to bind to the query
(leaving it to the PreparedStatement to guess the corresponding SQL type)
org.springframework.dao.DataAccessException
- if the query failsJdbcTemplate.queryForList(String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |