Class BooleanExpressions
- java.lang.Object
-
- dev.morphia.aggregation.expressions.BooleanExpressions
-
public final class BooleanExpressions extends Object
Defines helper methods for the boolean expressions- Since:
- 2.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BooleanExpressions.LogicalExpression
Defines a logical expression.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BooleanExpressions.LogicalExpression
and()
Evaluates one or more expressions and returns true if all the expressions are true or if evoked with no argument expressions.static BooleanExpressions.LogicalExpression
and(dev.morphia.aggregation.expressions.impls.Expression first, dev.morphia.aggregation.expressions.impls.Expression... additional)
Evaluates one or more expressions and returns true if all the expressions are true or if evoked with no argument expressions.static dev.morphia.aggregation.expressions.impls.Expression
not(dev.morphia.aggregation.expressions.impls.Expression value)
Evaluates a boolean and returns the opposite boolean value; i.e.static BooleanExpressions.LogicalExpression
or()
Evaluates one or more expressions and returns true if any of the expressions are true.static BooleanExpressions.LogicalExpression
or(dev.morphia.aggregation.expressions.impls.Expression first, dev.morphia.aggregation.expressions.impls.Expression... additional)
Evaluates one or more expressions and returns true if any of the expressions are true.
-
-
-
Method Detail
-
and
public static BooleanExpressions.LogicalExpression and(dev.morphia.aggregation.expressions.impls.Expression first, dev.morphia.aggregation.expressions.impls.Expression... additional)
Evaluates one or more expressions and returns true if all the expressions are true or if evoked with no argument expressions. Otherwise, $and returns false.- Parameters:
first
- the first expressionadditional
- any additional expressions- Returns:
- the new expression
- MongoDB documentation
- Aggregration Expression: $and
-
and
public static BooleanExpressions.LogicalExpression and()
Evaluates one or more expressions and returns true if all the expressions are true or if evoked with no argument expressions. Otherwise, $and returns false.- Returns:
- the new expression
- Since:
- 2.3
- MongoDB documentation
- Aggregration Expression: $and
-
not
public static dev.morphia.aggregation.expressions.impls.Expression not(dev.morphia.aggregation.expressions.impls.Expression value)
Evaluates a boolean and returns the opposite boolean value; i.e. when passed an expression that evaluates to true, $not returns false; when passed an expression that evaluates to false, $not returns true.- Parameters:
value
- the expression- Returns:
- the new expression
- MongoDB documentation
- Aggregration Expression: $not
-
or
public static BooleanExpressions.LogicalExpression or(dev.morphia.aggregation.expressions.impls.Expression first, dev.morphia.aggregation.expressions.impls.Expression... additional)
Evaluates one or more expressions and returns true if any of the expressions are true. Otherwise, $or returns false.- Parameters:
first
- the first expressionadditional
- any additional expressions- Returns:
- the new expression
- MongoDB documentation
- Aggregration Expression: $or
-
or
public static BooleanExpressions.LogicalExpression or()
Evaluates one or more expressions and returns true if any of the expressions are true. Otherwise, $or returns false.- Returns:
- the new expression
- Since:
- 2.3
- MongoDB documentation
- Aggregration Expression: $or
-
-