EntityT
- VdmObject that the expression is operating on.public class ExpressionFluentHelper<EntityT> extends Object
and
and or
as methods in this class.
Negation can be achieved by not
. Every logical operator creates and returns a new instance based on
the original expression object. Instantiating objects from this class directly can cause undefined results.not(ExpressionFluentHelper)
Modifier | Constructor and Description |
---|---|
protected |
ExpressionFluentHelper(FilterExpressionWrapper<?> expression) |
Modifier and Type | Method and Description |
---|---|
ExpressionFluentHelper<EntityT> |
and(ExpressionFluentHelper<EntityT> conjunctExpression)
Boolean AND expression fluent helper.
|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
List<com.sap.cloud.sdk.s4hana.datamodel.odata.helper.ExpressionFluentHelper.LogicPair> |
getChain() |
FilterExpressionWrapper<?> |
getExpression() |
int |
hashCode() |
boolean |
isNegateOperator() |
ExpressionFluentHelper<EntityT> |
not()
Boolean NOT expression fluent helper.
|
static <T> ExpressionFluentHelper<T> |
not(ExpressionFluentHelper<T> expression)
Boolean NOT expression fluent helper.
|
ExpressionFluentHelper<EntityT> |
or(ExpressionFluentHelper<EntityT> disjunctExpression)
Boolean OR expression fluent helper.
|
String |
toString() |
protected ExpressionFluentHelper(FilterExpressionWrapper<?> expression)
public ExpressionFluentHelper<EntityT> or(ExpressionFluentHelper<EntityT> disjunctExpression)
Boolean OR expression fluent helper.
Please note:
Filter expressions chained together by logical operators are interpreted in the same order as their corresponding
methods are called. Since the Java language evaluates method calls from left to right, the fluent API design is
following the same principle. The implicit precedence is following the method invocation and not the underlying,
logical operators:
A.or(B).and(C) <=> (A.or(B)).and(C)
Recommendation:
Incorporate parentheses or introduce variables to reflect combined expressions:
var AorB = A.or(B) AorB.and(C)
disjunctExpression
- Other expression to combine with.public ExpressionFluentHelper<EntityT> and(ExpressionFluentHelper<EntityT> conjunctExpression)
Boolean AND expression fluent helper.
Please note:
Filter expressions chained together by logical operators are interpreted in the same order as their corresponding
methods are called. Since the Java language evaluates method calls from left to right, the fluent API design is
following the same principle. The implicit precedence is following the method invocation and not the underlying,
logical operators:
A.or(B).and(C) <=> (A.or(B)).and(C)
Recommendation:
Incorporate parentheses or introduce variables to reflect combined expressions:
var AorB = A.or(B) AorB.and(C)
conjunctExpression
- Other expression to combine with.public ExpressionFluentHelper<EntityT> not()
public static <T> ExpressionFluentHelper<T> not(ExpressionFluentHelper<T> expression)
expression
- expression to be negated.protected boolean canEqual(Object other)
public List<com.sap.cloud.sdk.s4hana.datamodel.odata.helper.ExpressionFluentHelper.LogicPair> getChain()
public FilterExpressionWrapper<?> getExpression()
public boolean isNegateOperator()
Copyright © 2018 SAP SE. All rights reserved.