String groupName = Util.getParam(params, PARAM_GROUP_NAME);
int schematronId = Integer.parseInt(Util.getParam(params, PARAM_SCHEMATRON_ID));
final String requirement = Util.getParam(params, PARAM_REQUIREMENT, null);
if (requirement != null) {
repository.update(new SchematronCriteriaGroupId(groupName, schematronId), new Updater<SchematronCriteriaGroup>() {
@Override
public void apply(@Nonnull SchematronCriteriaGroup entity) {
entity.setRequirement(SchematronRequirement.valueOf(requirement.toUpperCase()));
}
});