spring convert from deprecated -
using simplejdbccall.returningresultset(parameterizedbeanpropertyrowmapper) deprecated spring 3.0.5. how change code use non-deprecated version of 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 able use beanpropertyrowmapper
instead of parameterizedbeanpropertyrowmapper
new simplejdbccall(jdbctemplate) .withcatalogname("package") .withprocedurename("proc") .returningresultset("curreportlist", beanpropertyrowmapper.newinstance(report.class));
the call
beanpropertyrowmapper.newinstance(report.class));
returns beanpropertyrowmapper
instance implements rowmapper
. non deprecated version of returningresultset
used.
Comments
Post a Comment