Using SimpleJdbcCall.returningResultSet(ParameterizedBeanPropertyRowMapper) is deprecated with Spring 3.0.5. How would change my code to use a non-deprecated version of this method?
private JdbcTemplate jdbcTemplate;
private SimpleJdbcCall procGetReportExtras;
public void setDataSource(DataSource dataSource) {
    this.jdbcTemplate = new JdbcTemplate(dataSource);
    jdbcTemplate.setResultsMapCaseInsensitive(true);
    this.procGetReportExtras =
            new SimpleJdbcCall(jdbcTemplate)
                .withCatalogName("package")
                .withProcedureName("proc")
                 .returningResultSet("CURREPORTLIST",
                            ParameterizedBeanPropertyRowMapper.newInstance(Report.class));
}
                You should be able to use a BeanPropertyRowMapper instead of ParameterizedBeanPropertyRowMapper
new SimpleJdbcCall(jdbcTemplate)
            .withCatalogName("package")
            .withProcedureName("proc")
             .returningResultSet("CURREPORTLIST",
                        BeanPropertyRowMapper.newInstance(Report.class));
The call
 BeanPropertyRowMapper.newInstance(Report.class));
returns a BeanPropertyRowMapper instance which implements RowMapper. The non deprecated version of returningResultSet will be used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With