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).
| TRUE | FALSE | NULL | |
| TRUE | TRUE | TRUE | TRUE |
| FALSE | TRUE | FALSE | NULL |
| NULL | TRUE | NULL | NULL |
BNF: conditional_expression ::= conditional_expression OR conditional_term
OrExpression
| Access | Constructor and Description |
|---|---|
| public | OrExpressionStateObject(StateObject
The parent of this state object, which cannot be parent)nullCreates a new |
| public | OrExpressionStateObject(StateObject
The parent of this state object, which cannot be parent, StateObject nullThe leftStateObject, StateObject StateObject representing the left expressionThe rightStateObject)StateObject representing the right expressionCreates a new |
| public | OrExpressionStateObject(StateObject
The parent of this state object, which cannot be parent, String nullThe string representation of the left expression to parse and to
convert into a leftJpqlFragment, String StateObjectThe string representation of the right expression to parse and to
convert into a rightJpqlFragment)StateObjectCreates a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(StateObjectVisitor
The visitor)visitor to visit this objectImplements org. StateObject by the given visitor.
|
| public OrExpression | getExpression()
Overrides org. Implements org. StateObject representation of the JPQL query
was created by parsing an existing JPQL query.
|
| public String | getIdentifier()
Implements abstract org. StateObjects.
|
| protected String | getLeftQueryBNFId()
Implements abstract org. |
| protected String | getRightQueryBNFId()
Implements abstract org. |
| public void | setExpression(OrExpression
The expression)parsed object representing a logical
OR expressionKeeps a reference of the |
| OrExpressionStateObject | back to summary |
|---|---|
| public OrExpressionStateObject(StateObject parent) Creates a new
| |
| OrExpressionStateObject | back to summary |
|---|---|
| public OrExpressionStateObject(StateObject parent, StateObject leftStateObject, StateObject rightStateObject) Creates a new
| |
| OrExpressionStateObject | back to summary |
|---|---|
| public OrExpressionStateObject(StateObject parent, String leftJpqlFragment, String rightJpqlFragment) Creates a new
| |
| accept | back to summary |
|---|---|
| public void accept(StateObjectVisitor visitor) Implements org. Doc from org. Visits this
| |
| getExpression | back to summary |
|---|---|
| public OrExpression getExpression() Overrides org. Implements org. Doc from org. Returns the actual parsed object if this
| |
| getIdentifier | back to summary |
|---|---|
| public String getIdentifier() Implements abstract org. Doc from org. Returns the identifier joining the two | |
| getLeftQueryBNFId | back to summary |
|---|---|
| protected String getLeftQueryBNFId() Implements abstract org. Doc from org. Returns the unique identifier of the BNF that will be used to parse a JPQL fragment as the left side of the expression. | |
| getRightQueryBNFId | back to summary |
|---|---|
| protected String getRightQueryBNFId() Implements abstract org. Doc from org. Returns the unique identifier of the BNF that will be used to parse a JPQL fragment as the right side of the expression. | |
| setExpression | back to summary |
|---|---|
| public void setExpression(OrExpression expression) Keeps a reference of the
| |