Stormpath SDK 是否提供了一种为 NOT 条件构建查询的方法?

Does Stormpath SDK provide a way to build queries for the NOT condition?

使用 StormpathSDK,您通常会像这样构建查询:

Groups.where(Groups.name().eqIgnoreCase("SIMPLE_ADMIN"))

注意: Groups.name() 是类型表达式工厂,例如 StringExpressionFactory

现在对于日期,存在一些日期表达式方法,例如;

<date-expression>.matches(String value)
<date-expression>.gt(Date value)
<date-expression>.lt(Date value)
<date-expression>.gte(Date value)
<date-expression>.lte(Date value)
<date-expression>.equals(Date value)
<date-expression>.in(Date begin, Date end)
<date-expression>.in(Date begin, Duration duration)

对于字符串,存在以下字符串表达式方法;

<string-expression>.eqIgnoreCase(String value)
<string-expression>.startsWithIgnoreCase(String value)
<string-expression>.endsWithIgnoreCase(String value)
<string-expression>.containsIgnoreCase(String value)

由于这些表达式不return 可以由例如布尔否定符操作的类型,我觉得很奇怪,没有比较方法来检查 NOT 条件 例如

<expression>.notEquals(...)
<expression>.notMatches(...)
<expression>.notContains(...)
<expression>.notIn(...)

有没有已知的方法可以实现这些类型的方法应该做的事情?...有人可以给我指出正确的方向吗?

谢谢!

如果否定是可能的,它可能会作为 Typed ExpressionFactory 的修饰符使用,例如:

<date-expression>.not().matches(String value)
<date-expression>.not().gt(Date value)
<date-expression>.not().lt(Date value)
<date-expression>.not().gte(Date value)
<date-expression>.not().lte(Date value)
<date-expression>.not().equals(Date value)
<date-expression>.not().in(Date begin, Date end)
<date-expression>.not().in(Date begin, Duration duration)

但是,Java SDK(或 Stormpath 的其他 SDK)中不存在此功能,因为底层 REST API 当前不支持查询条件中的否定。