Top Description Constructors Methods
org.eclipse.persistence.jpa.jpql.parser

public final Class AndExpression

extends LogicalExpression
Class Inheritance
Imports
org.eclipse.persistence.jpa.jpql.WordParser

The AND logical operator chains multiple criteria together. A valid operand of an AND operator must be one of: TRUE, FALSE, and NULL. The AND operator has a higher precedence than the OR operator.

NULL represents unknown. Therefore, if one operand is NULL and the other operand is FALSE the result is FALSE, because one FALSE operand is sufficient for a FALSE result. If one operand is NULL and the other operand is either TRUE or NULL, the result is NULL (unknown).

The following table shows how the AND operator is evaluated based on its two operands:
TRUEFALSENULL
TRUE TRUE FALSE NULL
FALSE FALSE FALSE FALSE
NULL NULL FALSE NULL
BNF: conditional_term ::= conditional_term AND conditional_factor
Author
Pascal Filion
Since
2.3
Version
2.5

Constructor Summary

AccessConstructor and Description
public
AndExpression(AbstractExpression
The parent of this expression
parent
)

Creates a new AndExpression.

Method Summary

Modifier and TypeMethod and Description
public void
accept(ExpressionVisitor
The ExpressionVisitor to visit this object
visitor
)

Implements org.eclipse.persistence.jpa.jpql.parser.Expression.accept.

Visits this Expression by the given visitor.
public String
getLeftExpressionQueryBNFId()

Implements abstract org.eclipse.persistence.jpa.jpql.parser.CompoundExpression.getLeftExpressionQueryBNFId.

Returns the unique identifier of the JPQLQueryBNF for the left expression.
public String
getRightExpressionQueryBNFId()

Implements abstract org.eclipse.persistence.jpa.jpql.parser.CompoundExpression.getRightExpressionQueryBNFId.

Returns the unique identifier of the JPQLQueryBNF for the right expression.
protected boolean
isParsingComplete(WordParser
The text to parse based on the current position of the cursor
wordParser
,
String
The word that was retrieved from the given text, which is the first word in the text
word
,
Expression
The Expression that has already been parsed
expression
)

Overrides org.eclipse.persistence.jpa.jpql.parser.LogicalExpression.isParsingComplete.

Determines whether the parsing is complete based on what is left in the given text.
Inherited from org.eclipse.persistence.jpa.jpql.parser.LogicalExpression:
getQueryBNFparseIdentifier

Constructor Detail

AndExpressionback to summary
public AndExpression(AbstractExpression parent)

Creates a new AndExpression.

Parameters
parent:AbstractExpression

The parent of this expression

Method Detail

acceptback to summary
public void accept(ExpressionVisitor visitor)

Implements org.eclipse.persistence.jpa.jpql.parser.Expression.accept.

Doc from org.eclipse.persistence.jpa.jpql.parser.Expression.accept.

Visits this Expression by the given visitor.

Parameters
visitor:ExpressionVisitor

The ExpressionVisitor to visit this object

Annotations
@Override
getLeftExpressionQueryBNFIdback to summary
public String getLeftExpressionQueryBNFId()

Implements abstract org.eclipse.persistence.jpa.jpql.parser.CompoundExpression.getLeftExpressionQueryBNFId.

Doc from org.eclipse.persistence.jpa.jpql.parser.CompoundExpression.getLeftExpressionQueryBNFId.

Returns the unique identifier of the JPQLQueryBNF for the left expression.

Returns:String

The ID of the BNF used when parsing the expression before the identifier

Annotations
@Override
getRightExpressionQueryBNFIdback to summary
public String getRightExpressionQueryBNFId()

Implements abstract org.eclipse.persistence.jpa.jpql.parser.CompoundExpression.getRightExpressionQueryBNFId.

Doc from org.eclipse.persistence.jpa.jpql.parser.CompoundExpression.getRightExpressionQueryBNFId.

Returns the unique identifier of the JPQLQueryBNF for the right expression.

Returns:String

The ID of the BNF used when parsing the expression after the identifier

Annotations
@Override
isParsingCompleteback to summary
protected boolean isParsingComplete(WordParser wordParser, String word, Expression expression)

Overrides org.eclipse.persistence.jpa.jpql.parser.LogicalExpression.isParsingComplete.

Doc from org.eclipse.persistence.jpa.jpql.parser.AbstractExpression.isParsingComplete.

Determines whether the parsing is complete based on what is left in the given text. The text is never empty.

Parameters
wordParser:WordParser

The text to parse based on the current position of the cursor

word:String

The word that was retrieved from the given text, which is the first word in the text

expression:Expression

The Expression that has already been parsed

Returns:boolean

true if the text no longer can't be parsed by the current expression; false if more can be parsed

Annotations
@Override