literalType.valueToString(literalType.valueOfString(literal.getUriLiteral(), EdmLiteralKind.URI, null,
literalType.getDefaultType()), EdmLiteralKind.DEFAULT, null);
return evaluateComparingExpression(value, literalType);
case METHOD:
final MethodExpression methodExpression = (MethodExpression) whereExpression;
String first = parseToJPAWhereExpression(methodExpression.getParameters().get(0), tableAlias);
final String second =
methodExpression.getParameterCount() > 1 ? parseToJPAWhereExpression(methodExpression.getParameters().get(1),
tableAlias) : null;
String third =
methodExpression.getParameterCount() > 2 ? parseToJPAWhereExpression(methodExpression.getParameters().get(2),
tableAlias) : null;
switch (methodExpression.getMethod()) {
case SUBSTRING:
third = third != null ? ", " + third : "";
return String.format("SUBSTRING(%s, %s + 1 %s)", first, second, third);
case SUBSTRINGOF:
first = first.substring(1, first.length() - 1);