Save This Page
Home » spring-framework-2.5.4 » org.springframework » jdbc » object » [javadoc | source]
org.springframework.jdbc.object
abstract public class: UpdatableSqlQuery [javadoc | source]
java.lang.Object
   org.springframework.jdbc.object.RdbmsOperation
      org.springframework.jdbc.object.SqlOperation
         org.springframework.jdbc.object.SqlQuery
            org.springframework.jdbc.object.UpdatableSqlQuery

All Implemented Interfaces:
    InitializingBean

Reusable RDBMS query in which concrete subclasses must implement the abstract updateRow(ResultSet, int, context) method to update each row of the JDBC ResultSet and optionally map contents into an object.

Subclasses can be constructed providing SQL, parameter types and a DataSource. SQL will often vary between subclasses.

Nested Class Summary:
protected class  UpdatableSqlQuery.RowMapperImpl  Implementation of RowMapper that calls the enclosing class's updateRow() method for each row. 
Fields inherited from org.springframework.jdbc.object.RdbmsOperation:
logger
Constructor:
 public UpdatableSqlQuery() 
 public UpdatableSqlQuery(DataSource ds,
    String sql) 
    Convenient constructor with DataSource and SQL string.
    Parameters:
    ds - DataSource to use to get connections
    sql - SQL to run
Method from org.springframework.jdbc.object.UpdatableSqlQuery Summary:
newRowMapper,   updateRow
Methods from org.springframework.jdbc.object.SqlQuery:
execute,   execute,   execute,   execute,   execute,   execute,   execute,   execute,   execute,   execute,   execute,   execute,   executeByNamedParam,   executeByNamedParam,   findObject,   findObject,   findObject,   findObject,   findObject,   findObject,   findObject,   findObject,   findObject,   findObject,   findObjectByNamedParam,   findObjectByNamedParam,   getRowsExpected,   newRowMapper,   setRowsExpected
Methods from org.springframework.jdbc.object.SqlOperation:
compileInternal,   getParsedSql,   newPreparedStatementCreator,   newPreparedStatementCreator,   newPreparedStatementSetter,   onCompileInternal
Methods from org.springframework.jdbc.object.RdbmsOperation:
afterPropertiesSet,   allowsUnusedParameters,   checkCompiled,   compile,   compileInternal,   declareParameter,   getDeclaredParameters,   getGeneratedKeysColumnNames,   getJdbcTemplate,   getResultSetType,   getSql,   isCompiled,   isReturnGeneratedKeys,   isUpdatableResults,   setDataSource,   setFetchSize,   setGeneratedKeysColumnNames,   setJdbcTemplate,   setMaxRows,   setParameters,   setQueryTimeout,   setResultSetType,   setReturnGeneratedKeys,   setSql,   setTypes,   setUpdatableResults,   supportsLobParameters,   validateNamedParameters,   validateParameters
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.jdbc.object.UpdatableSqlQuery Detail:
 protected RowMapper newRowMapper(Object[] parameters,
    Map context) 
    Implementation of the superclass template method. This invokes the subclass's implementation of the updateRow() method.
 abstract protected Object updateRow(ResultSet rs,
    int rowNum,
    Map context) throws SQLException
    Subclasses must implement this method to update each row of the ResultSet and optionally create object of the result type.