Class Expression
java.lang.Object
org.datanucleus.store.query.expression.Expression
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ArrayExpression
,CaseExpression
,ClassExpression
,CreatorExpression
,DyadicExpression
,InvokeExpression
,JoinExpression
,Literal
,OrderExpression
,ParameterExpression
,PrimaryExpression
,SubqueryExpression
,TypeExpression
,VariableExpression
A Scalar expression in a Query. Used to compute values with a resulting type.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
"Dyadic" operator performs operation on one or two operands.static class
"Monadic" operator performs a function on one operand.static class
Representation of an Operator. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected Expression
protected Expression.Operator
static final Expression.DyadicOperator
ADDstatic final Expression.DyadicOperator
ANDstatic final Expression.DyadicOperator
BITWISE ANDstatic final Expression.DyadicOperator
BITWISE ORstatic final Expression.DyadicOperator
BITWISE XORstatic final Expression.DyadicOperator
ISstatic final Expression.MonadicOperator
COMstatic final Expression.DyadicOperator
CONCATstatic final Expression.MonadicOperator
DISTINCTstatic final Expression.DyadicOperator
DIVstatic final Expression.DyadicOperator
EQstatic final Expression.DyadicOperator
GTstatic final Expression.DyadicOperator
GTEQstatic final Expression.DyadicOperator
INstatic final Expression.DyadicOperator
ISstatic final Expression.DyadicOperator
ISNOTstatic final Expression.DyadicOperator
LIKEstatic final Expression.DyadicOperator
LTstatic final Expression.DyadicOperator
LTEQstatic final Expression.DyadicOperator
MODstatic final Expression.DyadicOperator
MULstatic final Expression.MonadicOperator
NEGstatic final Expression.MonadicOperator
NOTstatic final Expression.DyadicOperator
NOTEQstatic final Expression.DyadicOperator
NOTINstatic final Expression.DyadicOperator
ORstatic final Expression.DyadicOperator
SUBprotected Expression
Parent of this expression in the tree (if any).protected Expression
private static final long
protected Symbol
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructor.protected
Expression
(Expression.MonadicOperator op, Expression operand) Perform a functionop
onoperand
protected
Expression
(Expression operand1, Expression.DyadicOperator op, Expression operand2) Performs a function on two arguments. -
Method Summary
Modifier and TypeMethodDescriptionabstract Symbol
bind
(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.getAlias()
getLeft()
Accessor for the left hand expression.The operator to be performed by this expression.Accessor for the parent expression where this expression is access from.getRight()
Accessor for the right hand expression.Accessor for the symbol for this expression (if set).void
void
setLeft
(Expression expr) void
setRight
(Expression expr)
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
parent
Parent of this expression in the tree (if any). -
op
-
left
-
right
-
symbol
-
alias
-
OP_OR
OR -
OP_AND
AND -
OP_NOT
NOT -
OP_EQ
EQ -
OP_NOTEQ
NOTEQ -
OP_LT
LT -
OP_LTEQ
LTEQ -
OP_GT
GT -
OP_GTEQ
GTEQ -
OP_LIKE
LIKE -
OP_IS
IS -
OP_ISNOT
ISNOT -
OP_CAST
IS -
OP_IN
IN -
OP_NOTIN
NOTIN -
OP_BIT_OR
BITWISE OR -
OP_BIT_XOR
BITWISE XOR -
OP_BIT_AND
BITWISE AND -
OP_ADD
ADD -
OP_SUB
SUB -
OP_CONCAT
CONCAT -
OP_MUL
MUL -
OP_DIV
DIV -
OP_MOD
MOD -
OP_NEG
NEG -
OP_COM
COM -
OP_DISTINCT
DISTINCT
-
-
Constructor Details
-
Expression
protected Expression()Constructor. -
Expression
Perform a functionop
onoperand
- Parameters:
op
- operatoroperand
- operand
-
Expression
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
-
getParent
Accessor for the parent expression where this expression is access from.- Returns:
- Parent expression
-
setLeft
-
setRight
-
getOperator
The operator to be performed by this expression. See the OP_{name} final static properties of this class.- Returns:
- Operator
-
getLeft
Accessor for the left hand expression.- Returns:
- Left expression
-
getRight
Accessor for the right hand expression.- Returns:
- Right expression
-
getSymbol
Accessor for the symbol for this expression (if set).- Returns:
- The symbol
-
setAlias
-
getAlias
-
evaluate
Method to evaluate this expression, using the passed evaluator.- Parameters:
eval
- Evaluator- Returns:
- The result
-
bind
Method to bind the expression to the symbol table as appropriate.- Parameters:
symtbl
- Symbol table- Returns:
- The symbol for this expression
-