Class CaseExpression<T,R>
- java.lang.Object
-
- org.apache.qpid.server.query.engine.parsing.expression.AbstractExpressionNode<T,R>
-
- org.apache.qpid.server.query.engine.parsing.expression.conditional.CaseExpression<T,R>
-
- Type Parameters:
T- Input parameter typeR- Output parameter type
- All Implemented Interfaces:
java.util.function.Function<T,R>,Expression<T,R>,ExpressionNode<T,R>
public class CaseExpression<T,R> extends AbstractExpressionNode<T,R>
Conditional CASE operation. It goes through conditions and returns a value when the first condition is met (like an if-then-else statement). So, once a condition is true, it will stop reading and return the result. If no conditions are true, it returns the value in the ELSE clause.
-
-
Field Summary
-
Fields inherited from class org.apache.qpid.server.query.engine.parsing.expression.AbstractExpressionNode
_metadata
-
-
Constructor Summary
Constructors Constructor Description CaseExpression(java.util.List<ExpressionNode<T,R>> conditions, java.util.List<ExpressionNode<T,R>> outcomes)Constructor initializes children expression list
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rapply(T value)Performs CASE operation using parameters and the value supplied-
Methods inherited from class org.apache.qpid.server.query.engine.parsing.expression.AbstractExpressionNode
containsAggregation, ctx, evaluateChild, getAggregations, getAlias, getChild, getChildren, getParent, isAccessor, isInstantlyEvaluable, setAlias, setParent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.qpid.server.query.engine.parsing.expression.Expression
andThen
-
-
-
-
Constructor Detail
-
CaseExpression
public CaseExpression(java.util.List<ExpressionNode<T,R>> conditions, java.util.List<ExpressionNode<T,R>> outcomes)
Constructor initializes children expression list- Parameters:
conditions- List of condition expressionsoutcomes- List of outcome expressions
-
-