|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IterableJdbcOperations
Extension interface for JdbcOperations
. All methods, that return List
mirrored with queryForIter
methods that return CloseableIterator
.
Javadocs borrowed from JdbcOperations
.
IterableNamedParameterJdbcOperations
Method Summary | ||
---|---|---|
|
queryForIter(org.springframework.jdbc.core.PreparedStatementCreator psc,
org.springframework.jdbc.core.PreparedStatementSetter pss,
org.springframework.jdbc.core.RowMapper<T> rowMapper)
Query using a prepared statement, mapping each row to a Java object via a RowMapper. |
|
|
queryForIter(org.springframework.jdbc.core.PreparedStatementCreator psc,
org.springframework.jdbc.core.RowMapper<T> rowMapper)
Query using a prepared statement, mapping each row to a Java object via a RowMapper. |
|
CloseableIterator<Map<String,Object>> |
queryForIter(String sql)
Execute a query for a result iterator, given static SQL. |
|
|
queryForIter(String sql,
Class<T> elementType)
Execute a query for a result шterator, given static SQL. |
|
|
queryForIter(String sql,
Class<T> elementType,
Object... args)
Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result iterator. |
|
CloseableIterator<Map<String,Object>> |
queryForIter(String sql,
Object... args)
Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result iterator. |
|
|
queryForIter(String sql,
Object[] args,
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 iterator. |
|
CloseableIterator<Map<String,Object>> |
queryForIter(String sql,
Object[] args,
int[] argTypes)
Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result iterator. |
|
|
queryForIter(String sql,
Object[] args,
int[] argTypes,
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 iterator. |
|
|
queryForIter(String sql,
Object[] args,
int[] argTypes,
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. |
|
|
queryForIter(String sql,
Object[] args,
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. |
|
|
queryForIter(String sql,
org.springframework.jdbc.core.PreparedStatementSetter pss,
org.springframework.jdbc.core.RowMapper<T> rowMapper)
Query given SQL to create a prepared statement from SQL and a PreparedStatementSetter implementation that knows how to bind values to the query, mapping each row to a Java object via a RowMapper. |
|
|
queryForIter(String sql,
org.springframework.jdbc.core.RowMapper<T> rowMapper)
Execute a query given static SQL, mapping each row to a Java object via a RowMapper. |
|
|
queryForIter(String sql,
org.springframework.jdbc.core.RowMapper<T> rowMapper,
Object... args)
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 |
---|
<T> CloseableIterator<T> queryForIter(org.springframework.jdbc.core.PreparedStatementCreator psc, org.springframework.jdbc.core.RowMapper<T> rowMapper) throws org.springframework.dao.DataAccessException
A PreparedStatementCreator can either be implemented directly or configured through a PreparedStatementCreatorFactory.
psc
- object that can create a PreparedStatement given a Connection
If this is null, the SQL will be assumed to contain no bind parameters.rowMapper
- object that will map one object per row
org.springframework.dao.DataAccessException
- if there is any problemPreparedStatementCreatorFactory
<T> CloseableIterator<T> queryForIter(org.springframework.jdbc.core.PreparedStatementCreator psc, org.springframework.jdbc.core.PreparedStatementSetter pss, org.springframework.jdbc.core.RowMapper<T> rowMapper) throws org.springframework.dao.DataAccessException
A PreparedStatementCreator can either be implemented directly or configured through a PreparedStatementCreatorFactory.
psc
- object that can create a PreparedStatement given a Connectionpss
- object that knows how to set values on the prepared statement.
If this is null, the SQL will be assumed to contain no bind parameters.rowMapper
- object that will map one object per row
org.springframework.dao.DataAccessException
- if there is any problemPreparedStatementCreatorFactory
<T> CloseableIterator<T> queryForIter(String sql, org.springframework.jdbc.core.RowMapper<T> rowMapper) throws org.springframework.dao.DataAccessException
Uses a JDBC Statement, not a PreparedStatement. If you want to
execute a static query with a PreparedStatement, use the overloaded
queryForIter
method with null
as argument array.
sql
- SQL query to executerowMapper
- object that will map one object per row
org.springframework.dao.DataAccessException
- if there is any problem executing the queryqueryForIter(String, Object[], RowMapper)
<T> CloseableIterator<T> queryForIter(String sql, Class<T> elementType) throws org.springframework.dao.DataAccessException
Uses a JDBC Statement, not a PreparedStatement. If you want to
execute a static query with a PreparedStatement, use the overloaded
queryForIter
method with null
as argument array.
The results will be mapped to a Iterator (one entry for each row) of result objects, each of them matching the specified element type.
sql
- SQL query to executeelementType
- the required type of element in the result шterator
(for example, Integer.class
)
org.springframework.dao.DataAccessException
- if there is any problem executing the queryqueryForIter(String, Object[], Class)
,
SingleColumnRowMapper
CloseableIterator<Map<String,Object>> queryForIter(String sql) throws org.springframework.dao.DataAccessException
Uses a JDBC Statement, not a PreparedStatement. If you want to
execute a static query with a PreparedStatement, use the overloaded
queryForIter
method with null
as argument array.
The results will be mapped to a Iterator (one entry for each row) of Maps (one entry for each column using the column name as the key). Each element in the iterator will be of the form returned by this interface's queryForMap() methods.
sql
- SQL query to execute
org.springframework.dao.DataAccessException
- if there is any problem executing the queryqueryForIter(String, Object[])
<T> CloseableIterator<T> queryForIter(String sql, org.springframework.jdbc.core.PreparedStatementSetter pss, org.springframework.jdbc.core.RowMapper<T> rowMapper) throws org.springframework.dao.DataAccessException
sql
- SQL query to executepss
- object that knows how to set values on the prepared statement.
If this is null
, the SQL will be assumed to contain no bind parameters.
Even if there are no bind parameters, this object may be used to
set fetch size and other performance options.rowMapper
- object that will map one object per row
org.springframework.dao.DataAccessException
- if the query fails<T> CloseableIterator<T> queryForIter(String sql, Object[] args, int[] argTypes, org.springframework.jdbc.core.RowMapper<T> rowMapper) throws org.springframework.dao.DataAccessException
sql
- SQL query to executeargs
- arguments to bind to the queryargTypes
- SQL types of the arguments
(constants from java.sql.Types
)rowMapper
- object that will map one object per row
org.springframework.dao.DataAccessException
- if the query failsTypes
<T> CloseableIterator<T> queryForIter(String sql, Object[] args, org.springframework.jdbc.core.RowMapper<T> rowMapper) throws org.springframework.dao.DataAccessException
sql
- SQL query to executeargs
- arguments to bind to the query
(leaving it to the PreparedStatement to guess the corresponding SQL type);
may also contain SqlParameterValue
objects which indicate not
only the argument value but also the SQL type and optionally the scalerowMapper
- 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.RowMapper<T> rowMapper, Object... args) throws org.springframework.dao.DataAccessException
sql
- SQL query to executerowMapper
- object that will map one object per rowargs
- arguments to bind to the query
(leaving it to the PreparedStatement to guess the corresponding SQL type);
may also contain SqlParameterValue
objects which indicate not
only the argument value but also the SQL type and optionally the scale
org.springframework.dao.DataAccessException
- if the query fails<T> CloseableIterator<T> queryForIter(String sql, Object[] args, int[] argTypes, Class<T> elementType) throws org.springframework.dao.DataAccessException
The results will be mapped to a Iterator (one entry for each row) of result objects, each of them matching the specified element type.
sql
- SQL query to executeargs
- arguments to bind to the queryargTypes
- SQL types of the arguments
(constants from java.sql.Types
)elementType
- the required type of element in the result iterator
(for example, Integer.class
)
org.springframework.dao.DataAccessException
- if the query failsqueryForIter(String, Class)
,
SingleColumnRowMapper
<T> CloseableIterator<T> queryForIter(String sql, Object[] args, Class<T> elementType) throws org.springframework.dao.DataAccessException
The results will be mapped to an Iterator (one entry for each row) of result objects, each of them matching the specified element type.
sql
- SQL query to executeargs
- arguments to bind to the query
(leaving it to the PreparedStatement to guess the corresponding SQL type);
may also contain SqlParameterValue
objects which indicate not
only the argument value but also the SQL type and optionally the scaleelementType
- the required type of element in the result iterator
(for example, Integer.class
)
org.springframework.dao.DataAccessException
- if the query failsqueryForIter(String, Class)
,
SingleColumnRowMapper
<T> CloseableIterator<T> queryForIter(String sql, Class<T> elementType, Object... args) throws org.springframework.dao.DataAccessException
The results will be mapped to an Iterator (one entry for each row) of result objects, each of them matching the specified element type.
sql
- SQL query to executeelementType
- the required type of element in the result iterator
(for example, Integer.class
)args
- arguments to bind to the query
(leaving it to the PreparedStatement to guess the corresponding SQL type);
may also contain SqlParameterValue
objects which indicate not
only the argument value but also the SQL type and optionally the scale
org.springframework.dao.DataAccessException
- if the query failsqueryForIter(String, Class)
,
SingleColumnRowMapper
CloseableIterator<Map<String,Object>> queryForIter(String sql, Object[] args, int[] argTypes) throws org.springframework.dao.DataAccessException
The results will be mapped to an Iterator (one entry for each row) of
Maps (one entry for each column, using the column name as the key).
Thus Each element in the iterator will be of the form returned by JdbcOperations
'
queryForMap() methods.
sql
- SQL query to executeargs
- arguments to bind to the queryargTypes
- SQL types of the arguments
(constants from java.sql.Types
)
org.springframework.dao.DataAccessException
- if the query failsqueryForIter(String)
,
Types
CloseableIterator<Map<String,Object>> queryForIter(String sql, Object... args) throws org.springframework.dao.DataAccessException
The results will be mapped to an Iterator (one entry for each row) of Maps (one entry for each column, using the column name as the key). Each element in the iterator will be of the form returned by this interface's queryForMap() methods.
sql
- SQL query to executeargs
- arguments to bind to the query
(leaving it to the PreparedStatement to guess the corresponding SQL type);
may also contain SqlParameterValue
objects which indicate not
only the argument value but also the SQL type and optionally the scale
org.springframework.dao.DataAccessException
- if the query failsqueryForIter(String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |