.setInteger("defectTracker", defectTrackerId)
.list());
if (defects != null && defects.size() > 0) {
for (Defect defect : defects) {
sessionFactory.getCurrentSession().save(new DeletedDefect(defect));
sessionFactory.getCurrentSession().delete(defect);
}
}
}