subrptdao.eraseSubreportByMasterRptId(masterReportId);
for(int i = 0; i < checkedObjectsList.size(); i++) {
SourceBean subreport = (SourceBean)checkedObjectsList.get(i);
String key = getObjectKey(subreport);
Integer subReportId = new Integer(key);
subrptdao.insertSubreport(new Subreport(masterReportId, subReportId));
}
} catch (Exception e) {
logger.error("Cannot erase/insert subreports from/into db", e);
}