if (selectedCriterion.startsWith(USER_CRITERION_PREFIX)) {
String searchString = selectedCriterion.substring(USER_CRITERION_PREFIX.length());
setDecodedString(filter, searchString);
} else if (selectedCriterion.startsWith(PREDEFINED_CRITERION_PREFIX)) {
String criterion = selectedCriterion.substring(PREDEFINED_CRITERION_PREFIX.length());
ExpressionFilterCriterion newCriterion;
if (criterion.equals(ALL))
newCriterion = null;
else if (criterion.equals(EMPTY))
newCriterion = new ExpressionFilterCriterion(FilterCondition.EMPTY, false);
else if (criterion.equals(NON_EMPTY))
newCriterion = new ExpressionFilterCriterion(FilterCondition.EMPTY, true);
else
throw new IllegalStateException("Unknown predefined criterion came from client: " + criterion);
setDecodedCriterion(filter, newCriterion);
} else
throw new IllegalStateException("Improperly formatted criterion came from client: " + selectedCriterion);