"or name='sqale_effort_to_grade_a' or name='sqale_effort_to_grade_b' or name='sqale_effort_to_grade_c' " +
"or name='sqale_effort_to_grade_d' or name='blocker_remediation_cost' or name='critical_remediation_cost' " +
"or name='major_remediation_cost' or name='minor_remediation_cost' or name='info_remediation_cost'").list(Select.LONG_READER);
if (!metricIds.isEmpty()) {
MassUpdate massUpdate = context.prepareMassUpdate();
massUpdate.rowPluralName("measures");
SqlStatement select = massUpdate.select("SELECT pm.id, pm.value " +
", pm.variation_value_1 , pm.variation_value_2, pm.variation_value_3 " +
", pm.variation_value_4 , pm.variation_value_5 " +
" FROM project_measures pm " +
" WHERE pm.metric_id IN (" + StringUtils.repeat("?", ",", metricIds.size()) + ")");
for (int i = 0; i < metricIds.size(); i++) {
select.setLong(i + 1, metricIds.get(i));
}
massUpdate.update("UPDATE project_measures SET value=?," +
"variation_value_1=?,variation_value_2=?,variation_value_3=?,variation_value_4=?,variation_value_5=? WHERE id=?");
massUpdate.execute(new Converter());
}
}