| java.lang.Object org.springframework.jdbc.object.RdbmsOperation org.springframework.jdbc.object.SqlOperation org.springframework.jdbc.object.SqlQuery org.springframework.jdbc.object.MappingSqlQueryWithParameters org.springframework.jdbc.object.MappingSqlQuery
All known Subclasses: org.springframework.jdbc.object.SqlFunction,
MappingSqlQuery | abstract public class MappingSqlQuery extends MappingSqlQueryWithParameters (Code) | | Reusable query in which concrete subclasses must implement the abstract
mapRow(ResultSet, int) method to convert each row of the JDBC ResultSet
into an object.
Simplifies MappingSqlQueryWithParameters API by dropping parameters and
context. Most subclasses won't care about parameters. If you don't use
contextual information, subclass this instead of MappingSqlQueryWithParameters.
author: Rod Johnson author: Thomas Risberg author: Jean-Pierre Pawlak See Also: MappingSqlQueryWithParameters |
Method Summary | |
final protected Object | mapRow(ResultSet rs, int rowNum, Object[] parameters, Map context) This method is implemented to invoke the simpler mapRow
template method, ignoring parameters. | abstract protected Object | mapRow(ResultSet rs, int rowNum) Subclasses must implement this method to convert each row of the
ResultSet into an object of the result type. |
MappingSqlQuery | public MappingSqlQuery()(Code) | | Constructor that allows use as a JavaBean.
|
MappingSqlQuery | public MappingSqlQuery(DataSource ds, String sql)(Code) | | Convenient constructor with DataSource and SQL string.
Parameters: ds - DataSource to use to obtain connections Parameters: sql - SQL to run |
mapRow | abstract protected Object mapRow(ResultSet rs, int rowNum) throws SQLException(Code) | | Subclasses must implement this method to convert each row of the
ResultSet into an object of the result type.
Subclasses of this class, as opposed to direct subclasses of
MappingSqlQueryWithParameters, don't need to concern themselves
with the parameters to the execute method of the query object.
Parameters: rs - ResultSet we're working through Parameters: rowNum - row number (from 0) we're up to an object of the result type throws: SQLException - if there's an error extracting data.Subclasses can simply not catch SQLExceptions, relying on theframework to clean up. |
Methods inherited from org.springframework.jdbc.object.SqlQuery | public List execute(Object[] params, Map context) throws DataAccessException(Code)(Java Doc) public List execute(Object[] params) throws DataAccessException(Code)(Java Doc) public List execute(Map context) throws DataAccessException(Code)(Java Doc) public List execute() throws DataAccessException(Code)(Java Doc) public List execute(int p1, Map context) throws DataAccessException(Code)(Java Doc) public List execute(int p1) throws DataAccessException(Code)(Java Doc) public List execute(int p1, int p2, Map context) throws DataAccessException(Code)(Java Doc) public List execute(int p1, int p2) throws DataAccessException(Code)(Java Doc) public List execute(long p1, Map context) throws DataAccessException(Code)(Java Doc) public List execute(long p1) throws DataAccessException(Code)(Java Doc) public List execute(String p1, Map context) throws DataAccessException(Code)(Java Doc) public List execute(String p1) throws DataAccessException(Code)(Java Doc) public List executeByNamedParam(Map paramMap, Map context) throws DataAccessException(Code)(Java Doc) public List executeByNamedParam(Map paramMap) throws DataAccessException(Code)(Java Doc) public Object findObject(Object[] params, Map context) throws DataAccessException(Code)(Java Doc) public Object findObject(Object[] params) throws DataAccessException(Code)(Java Doc) public Object findObject(int p1, Map context) throws DataAccessException(Code)(Java Doc) public Object findObject(int p1) throws DataAccessException(Code)(Java Doc) public Object findObject(int p1, int p2, Map context) throws DataAccessException(Code)(Java Doc) public Object findObject(int p1, int p2) throws DataAccessException(Code)(Java Doc) public Object findObject(long p1, Map context) throws DataAccessException(Code)(Java Doc) public Object findObject(long p1) throws DataAccessException(Code)(Java Doc) public Object findObject(String p1, Map context) throws DataAccessException(Code)(Java Doc) public Object findObject(String p1) throws DataAccessException(Code)(Java Doc) public Object findObjectByNamedParam(Map paramMap, Map context) throws DataAccessException(Code)(Java Doc) public Object findObjectByNamedParam(Map paramMap) throws DataAccessException(Code)(Java Doc) public int getRowsExpected()(Code)(Java Doc) abstract protected RowMapper newRowMapper(Object[] parameters, Map context)(Code)(Java Doc) public void setRowsExpected(int rowsExpected)(Code)(Java Doc)
|
Fields inherited from org.springframework.jdbc.object.RdbmsOperation | final protected Log logger(Code)(Java Doc)
|
|
|