for (SchematronCriteria schematronCriteria : group.getCriteria()) {
newGroup.addCriteria(schematronCriteria.copy());
}
if (group.getId().equals(newGroup.getId())) {
throw new BadInputEx(PARAM_NEW_GROUP_NAME + " and " + PARAM_NEW_SCHEMATRON_ID +
" have the same value as the old values", newGroupName+":"+newSchematronId){};
}
repository.delete(group.getId());
repository.saveAndFlush(newGroup);