org.springframework.jdbc.object
Class MappingSqlQuery

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
Direct Known Subclasses:
SqlFunction

public abstract class MappingSqlQuery
extends MappingSqlQueryWithParameters

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, Thomas Risberg, Jean-Pierre Pawlak
See Also: MappingSqlQueryWithParameters

Constructor Summary
MappingSqlQuery()
          Constructor to allow use as a JavaBean.
MappingSqlQuery(DataSource ds, String sql)
          Convenient constructor with DataSource and SQL string.

Methods inherited from class org.springframework.jdbc.object.SqlQuery
execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, findObject, findObject, findObject, findObject, findObject, findObject, findObject, findObject, findObject, findObject, getRowsExpected, setRowsExpected

Methods inherited from class org.springframework.jdbc.object.RdbmsOperation
afterPropertiesSet, compile, declareParameter, getSql, isCompiled, setDataSource, setJdbcTemplate, setSql, setTypes

Constructor Detail

MappingSqlQuery

public MappingSqlQuery()
Constructor to allow use as a JavaBean.

MappingSqlQuery

public MappingSqlQuery(DataSource ds, String sql)
Convenient constructor with DataSource and SQL string.
Parameters:
ds - DataSource to use to obtain connections
sql - SQL to run