use of org.apache.olingo.odata2.api.uri.expression.FilterExpression in project cxf by apache.
the class ODataParser method parse.
@Override
@SuppressWarnings("unchecked")
public SearchCondition<T> parse(String searchExpression) throws SearchParseException {
try {
final T condition = conditionClass.newInstance();
final FilterExpression expression = parser.parseFilterString(searchExpression);
final FilterExpressionVisitor visitor = new FilterExpressionVisitor(condition);
return (SearchCondition<T>) expression.accept(visitor);
} catch (ODataMessageException | ODataApplicationException | InstantiationException | IllegalAccessException ex) {
throw new SearchParseException(ex);
}
}
Aggregations