sb.append(String.format("Custom criteria: operator: [%s] key: [%s] values: [%s]\n",
customCriteria.getOperator(), customCriteria.getKeyId(),
StringUtils.join(ArrayUtils.toObject(customCriteria.getValueIds()), ",")));
return sb.toString();
} else if (root instanceof CustomCriteriaSet){
CustomCriteriaSet customCriteriaSet = (CustomCriteriaSet) root;
sb.append(String.format("Custom criteria set: operator: [%s] children: \n",
customCriteriaSet.getLogicalOperator()));
for (CustomCriteriaNode node : customCriteriaSet.getChildren()) {
sb.append(getCustomCriteriaSetString(node, level + 1));
}
return sb.append("\n").toString();
} else {
throw new IllegalStateException("Unexpected node: " + root);