Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 RESTful Web 服务在他们的请求中向我的 Producer 传递了一些过滤器信息。例如,他们的 URL 包括:- /ACCOUNT-LIST?$filter=Id eq '45012'
如何在 odata4j 中处理这个?
从 odata4j JavaDoc 我可以看到过滤器的类型是 BoolCommonExpression,但看不到任何关于我如何处理它的文档或示例。
另外,我如何处理超过 1 个通过的过滤器选项?
谢谢
BoolCommonExpression 是表达式层次结构(包括复合表达式)的基本类型。
您可以进行 instanceof 检查或使用 .visit(ExpressionVisitor) 以不同方式处理每种表达式类型。
希望有帮助, -约翰