Hello,
we are converting programs with a complex business logic, we didn't want to change. In this programs updateable cursors are used for tables with no primary key.
In JDBC 2.0 API there is a posibility to update, delete and insert rows in a Resultset.
Can this be done with Classes from Spring Batch too, or do I have to write my own extension of the JdbcCursorItemReader?
I'm looking for something like this:
// open connection, prepare Reader ...
itemReader.open(executionContext);
ResultBean resultBean = null;
while ((resultBean = itemReader.read()) != null)
{
if(condition)
{
itemReader.deleteRow();
// or
resultBean.setField1(newValue);
itemReader.updateRow(resultBean);
}
}
//cleanup ...


Reply With Quote
