The MemberOf class is an operator testing whether the value of a list of
Fields (the first n operands, which are supposed to be FieldOperands or
ParameterOperands) are
equal to one of the values of another list of Fields (the second n operands,
which are supposed to be FieldOperands).
As an example, consider the left list (fopA, fopB) and the right list
(fopC, fopD). Consider that fopA and fopB are FieldOperands for fields A and
B of QueryTree qt1 and that fopC and fopD are FieldOperands for fields C and
D of QueryTree qt2.
Consider the following data:
qt1 | qt2 |
a | b | c | d |
a1 | b1 | a1 | b1 |
a2 | b2 | a3 | b3 |
a3 | b3 | a3 | b3 |
| | a4 | b4 |
(a1,b1) and (a3,b3), values of (a,b), are members of the list of values
for (c,d), and appear in the result only once. Even (a3,b3) which appears
twice in (c,d) is only once in the result. This would not have been the case
with a join.
Note that, in the case of PNames, we only allow comparison of two
PNames, that is, the number of operands is supposed to be two and not more.
compileExpression
public Operand compileExpression()
throws TypingException,
MalformedExpressionException
evaluate
public Operand evaluate(ParameterOperand[] pos,
Object o)
throws ExpressionException
getOperatorString
public String getOperatorString()
getResult
public Operand getResult()
throws IllegalStateException