The
OR logical operator chains multiple criteria together. A valid operand of an
OR operator must be one of:
TRUE,
FALSE, and
NULL. The
OR operator has a lower precedence than the
AND operator.
NULL represents unknown. Therefore, if one operand is NULL and the other operand is TRUE the result is TRUE, because one TRUE operand is sufficient for a TRUE result. If one operand is NULL and the other operand is either FALSE or NULL, the result is NULL (unknown).
The following table shows how the OR operator is evaluated based on its two operands:
| TRUE | FALSE | NULL |
| TRUE | TRUE | TRUE | TRUE |
| FALSE | TRUE | FALSE | NULL |
| NULL | TRUE | NULL | NULL |
BNF: conditional_expression ::= conditional_expression OR conditional_term
@see OrExpression
@version 2.4
@since 2.4
@author Pascal Filion
| StateObject leftStateObject = stateObject;
expression.getRightExpression().accept(this);
StateObject rightStateObject = stateObject;
OrExpressionStateObject stateObject = new OrExpressionStateObject(
parent,
leftStateObject,
rightStateObject
);
stateObject.setExpression(expression);
this.stateObject = stateObject;
}
|
| checkBuilder(builder);
StateObject rightStateObject = pop();
StateObject leftStateObject = pop();
StateObject stateObject = new OrExpressionStateObject(
getParent(),
leftStateObject,
rightStateObject
);
|
| StateObject leftStateObject = stateObject;
expression.getRightExpression().accept(this);
StateObject rightStateObject = stateObject;
OrExpressionStateObject stateObject = new OrExpressionStateObject(
parent,
leftStateObject,
rightStateObject
);
stateObject.setExpression(expression);
this.stateObject = stateObject;
}
|
| checkBuilder(builder);
StateObject rightStateObject = pop();
StateObject leftStateObject = pop();
StateObject stateObject = new OrExpressionStateObject(
getParent(),
leftStateObject,
rightStateObject
);
|
| StateObject leftStateObject = stateObject;
expression.getRightExpression().accept(this);
StateObject rightStateObject = stateObject;
OrExpressionStateObject stateObject = new OrExpressionStateObject(
parent,
leftStateObject,
rightStateObject
);
stateObject.setExpression(expression);
this.stateObject = stateObject;
}
|
Related Classes of org.eclipse.persistence.jpa.jpql.model.query.OrExpressionStateObject
Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact
coftware#gmail.com.