Class DyadicExpression
java.lang.Object
org.datanucleus.store.query.expression.Expression
org.datanucleus.store.query.expression.DyadicExpression
- All Implemented Interfaces:
Serializable
Expression between two other expressions and an operation.
For example, "this.myField < myValue" will become
left = PrimaryExpression, right = Literal, op = Expression.OP_LT.
A special case is where we have an expression like "!(condition)". In this case we become
left = expression, right = null, op = Expression.OP_NOT.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.datanucleus.store.query.expression.Expression
Expression.DyadicOperator, Expression.MonadicOperator, Expression.Operator
-
Field Summary
FieldsFields inherited from class org.datanucleus.store.query.expression.Expression
alias, left, op, OP_ADD, OP_AND, OP_BIT_AND, OP_BIT_OR, OP_BIT_XOR, OP_CAST, OP_COM, OP_CONCAT, OP_DISTINCT, OP_DIV, OP_EQ, OP_GT, OP_GTEQ, OP_IN, OP_IS, OP_ISNOT, OP_LIKE, OP_LT, OP_LTEQ, OP_MOD, OP_MUL, OP_NEG, OP_NOT, OP_NOTEQ, OP_NOTIN, OP_OR, OP_SUB, parent, right, symbol
-
Constructor Summary
ConstructorsConstructorDescriptionDyadicExpression
(Expression.MonadicOperator op, Expression operand) Perform a functionop
onoperand
DyadicExpression
(Expression operand1, Expression.DyadicOperator op, Expression operand2) Performs a function on two arguments. -
Method Summary
Modifier and TypeMethodDescriptionbind
(SymbolTable symtbl) Method to bind the expression to the symbol table as appropriate.evaluate
(ExpressionEvaluator eval) Method to evaluate this expression, using the passed evaluator.toString()
Methods inherited from class org.datanucleus.store.query.expression.Expression
getAlias, getLeft, getOperator, getParent, getRight, getSymbol, setAlias, setLeft, setRight
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
DyadicExpression
Perform a functionop
onoperand
- Parameters:
op
- operatoroperand
- operand
-
DyadicExpression
Performs a function on two arguments. op(operand1,operand2) operand1 op operand2- Parameters:
operand1
- the first expressionop
- the operator between operandsoperand2
- the second expression
-
-
Method Details
-
evaluate
Method to evaluate this expression, using the passed evaluator.- Overrides:
evaluate
in classExpression
- Parameters:
eval
- Evaluator- Returns:
- The result
-
bind
Method to bind the expression to the symbol table as appropriate.- Specified by:
bind
in classExpression
- Parameters:
symtbl
- Symbol table- Returns:
- The symbol for this expression
-
toString
-