public void open(ExecutionContext context) {
Assert.state(!initialized, "Stream is already initialized. Close before re-opening.");
Assert.isNull(rs);
Assert.notNull(context, "ExecutionContext must not be null");
executeQuery();
initialized = true;
long currentProcessedRow = 0;
if (context.containsKey(getKey(CURRENT_PROCESSED_ROW))) {
try {
currentProcessedRow = context.getLong(getKey(CURRENT_PROCESSED_ROW));
while(rs.next()){
if(rs.getRow() == currentProcessedRow){
break;
}
}
} catch (SQLException se) {
throw getExceptionTranslator().translate("Attempted to move ResultSet to last committed row", sql, se);
}
}
//CHANGE
bufferredReader = new BufferredResultSetReader(rs, mapper);
bufferredReader.processedRowCount = currentProcessedRow;
//END CHANGE
}