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

public final Class ExistsExpression

extends AbstractSingleEncapsulatedExpression
Class Inheritance
Imports
org.eclipse.persistence.jpa.jpql.ExpressionTools, .WordParser

An EXISTS expression is a predicate that is true only if the result of the subquery consists of one or more values and that is false otherwise.
BNF: exists_expression ::= [NOT] EXISTS(subquery)
Author
Pascal Filion
Since
2.3
Version
2.5

Field Summary

Modifier and TypeField and Description
private String
notIdentifier

The actual NOT identifier found in the string representation of the JPQL query.

Constructor Summary

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

Creates a new ExistsExpression.

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

Returns:

The NOT identifier that was actually parsed, or an empty string if it was not parsed
getActualNotIdentifier
()

Returns the actual NOT identifier found in the string representation of the JPQL query, which has the actual case that was used.

public String
public JPQLQueryBNF
public boolean

Returns:

true if the identifier NOT was parsed; false otherwise
hasNot
()

Determines whether the identifier NOT was parsed.

protected void
parse(WordParser
The text to parse based on the current position of the cursor
wordParser
,
boolean
Determines whether the parsing system should be tolerant, meaning if it should try to parse invalid or incomplete queries
tolerant
)

Overrides org.eclipse.persistence.jpa.jpql.parser.AbstractEncapsulatedExpression.parse.

Parses the query by starting at the current position, which is part of the given WordParser.
protected AbstractExpression
parse(WordParser
The text to parse based on the current position of the cursor
wordParser
,
String
The unique identifier of the JPQLQueryBNF that is used to determine how to parse the text at the current cursor position within the JPQL query
queryBNFId
,
boolean
Determines whether the parsing system should be tolerant, meaning if it should try to parse invalid or incomplete queries
tolerant
)

Overrides org.eclipse.persistence.jpa.jpql.parser.AbstractExpression.parse.

Parses the given text by using the specified BNF.
Inherited from org.eclipse.persistence.jpa.jpql.parser.AbstractSingleEncapsulatedExpression:
acceptChildrenaddChildrenToaddOrderedEncapsulatedExpressionTofindQueryBNFgetExpressionhasEncapsulatedExpressionhasExpressionparseEncapsulatedExpressionremoveEncapsulatedExpressionsetExpressiontoParsedTextEncapsulatedExpression

Field Detail

notIdentifierback to summary
private String notIdentifier

The actual NOT identifier found in the string representation of the JPQL query.

Constructor Detail

ExistsExpressionback to summary
public ExistsExpression(AbstractExpression parent)

Creates a new ExistsExpression.

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
getActualNotIdentifierback to summary
public String getActualNotIdentifier()

Returns the actual NOT identifier found in the string representation of the JPQL query, which has the actual case that was used.

Returns:String

The NOT identifier that was actually parsed, or an empty string if it was not parsed

getEncapsulatedExpressionQueryBNFIdback to summary
public String getEncapsulatedExpressionQueryBNFId()

Implements abstract org.eclipse.persistence.jpa.jpql.parser.AbstractSingleEncapsulatedExpression.getEncapsulatedExpressionQueryBNFId.

Doc from org.eclipse.persistence.jpa.jpql.parser.AbstractSingleEncapsulatedExpression.getEncapsulatedExpressionQueryBNFId.

Returns the BNF used to parse the encapsulated expression.

Returns:String

The BNF used to parse the encapsulated expression

Annotations
@Override
getQueryBNFback to summary
public JPQLQueryBNF getQueryBNF()

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

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

Returns the BNF of this Expression.

Returns:JPQLQueryBNF

The JPQLQueryBNF, which represents the grammar of this Expression

Annotations
@Override
hasNotback to summary
public boolean hasNot()

Determines whether the identifier NOT was parsed.

Returns:boolean

true if the identifier NOT was parsed; false otherwise

parseback to summary
protected void parse(WordParser wordParser, boolean tolerant)

Overrides org.eclipse.persistence.jpa.jpql.parser.AbstractEncapsulatedExpression.parse.

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

Parses the query by starting at the current position, which is part of the given WordParser.

Parameters
wordParser:WordParser

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

tolerant:boolean

Determines whether the parsing system should be tolerant, meaning if it should try to parse invalid or incomplete queries

Annotations
@Override
parseback to summary
protected AbstractExpression parse(WordParser wordParser, String queryBNFId, boolean tolerant)

Overrides org.eclipse.persistence.jpa.jpql.parser.AbstractExpression.parse.

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

Parses the given text by using the specified BNF.

Parameters
wordParser:WordParser

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

queryBNFId:String

The unique identifier of the JPQLQueryBNF that is used to determine how to parse the text at the current cursor position within the JPQL query

tolerant:boolean

Determines whether the parsing system should be tolerant, meaning if it should try to parse invalid or incomplete queries

Returns:AbstractExpression

The Expression representing the given sub-query

Annotations
@Override