| org.ddsteps.step.spring.jdbc.SpringJdbcValidator
SpringJdbcValidator | abstract public class SpringJdbcValidator extends MappingSqlQuery implements TestStep(Code) | | Base class for Spring JDBC validators.
author: adam version: $Id: SpringJdbcValidator.java,v 1.1 2005/12/03 12:51:41 adamskogman Exp $ |
SpringJdbcValidator | public SpringJdbcValidator(DataSource ds, String sql)(Code) | | Use this constructor when you subclass this validator. You should have the datasource as a constructor argument,
but have a static SQL string in your constructor.
Remember to add parameters using (@link #declareParameter(org.springframework.jdbc.core.SqlParameter)) and lastly
call (@link #compile()).
Parameters: ds - DataSource Parameters: sql - SQL |
assembleParameters | abstract protected Object[] assembleParameters()(Code) | | Assemble the query parameters from your properties.
An object array, used with the query. |
mapRow | final protected Object mapRow(ResultSet rs, int rowNum) throws SQLException(Code) | | NULL object See Also: org.springframework.jdbc.object.MappingSqlQuery.mapRow(java.sql.ResultSetint) |
validateRow | abstract protected void validateRow(ResultSet rs, int rowNum) throws SQLException(Code) | | Implement your asserts here. If no rows are foudn by the query, this method is never called, but you will still
get a call to (@link #validateRowCount(int)).
Parameters: rs - The result set. Parameters: rowNum - First row is 0 throws: SQLException - Feel free to throw this, as Sprign will turn it into something useful for you. See Also: org.springframework.jdbc.object.MappingSqlQuery.mapRow(java.sql.ResultSetint) See Also: Has the same parameters. |
validateRowCount | abstract protected void validateRowCount(int numRows)(Code) | | Validate the number of rows you expected.
Parameters: numRows - The number of rows found. May be 0. |
|
|