Package org.eclipse.persistence.jpa.jpql
Class LiteralVisitor
java.lang.Object
org.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitor
org.eclipse.persistence.jpa.jpql.LiteralVisitor
- All Implemented Interfaces:
ExpressionVisitor
- Direct Known Subclasses:
DefaultLiteralVisitor
,EclipseLinkLiteralVisitor
This visitor traverses an
Expression
and retrieves the "literal" value. The literal to retrieve depends on the type
.
The literal is basically a string value like an identification variable name, an input parameter,
a path expression, an abstract schema name, etc.
Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
- Since:
- 2.4
- Version:
- 2.5
-
Field Summary
Modifier and TypeFieldDescriptionThe literal value retrieved from the visitedExpression
.protected LiteralType
TheLiteralType
helps to determine when traversing anExpression
what to retrieve. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetType()
Returns the way this visitor retrieves the literal value.void
setType
(LiteralType type) Changes the way this visitor should retrieve the literal value.void
visit
(AbstractSchemaName expression) Visits theAbstractSchemaName
expression.void
visit
(CollectionMemberDeclaration expression) Visits theCollectionMemberDeclaration
expression.void
visit
(CollectionValuedPathExpression expression) Visits theCollectionValuedPathExpression
expression.void
visit
(EntityTypeLiteral expression) Visits theEntityTypeLiteral
expression.void
visit
(FunctionExpression expression) Visits theFunctionExpression
expression.void
visit
(IdentificationVariable expression) Visits theIdentificationVariable
expression.void
visit
(InputParameter expression) Visits theInputParameter
expression.void
Visits theJoin
expression.void
visit
(RangeVariableDeclaration expression) Visits theRangeVariableDeclaration
expression.void
visit
(ResultVariable expression) Visits theResultVariable
expression.void
visit
(StateFieldPathExpression expression) Visits theStateFieldPathExpression
expression.void
visit
(StringLiteral expression) Visits theStringLiteral
expression.void
visit
(TreatExpression expression) Visits theTreatExpression
expression.protected void
visitAbstractPathExpression
(AbstractPathExpression expression) Methods inherited from class org.eclipse.persistence.jpa.jpql.parser.AnonymousExpressionVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
Field Details
-
literal
The literal value retrieved from the visitedExpression
. -
type
TheLiteralType
helps to determine when traversing anExpression
what to retrieve.
-
-
Constructor Details
-
LiteralVisitor
protected LiteralVisitor()Creates a newAbstractLiteralVisitor
.
-
-
Method Details
-
getType
Returns the way this visitor retrieves the literal value.- Returns:
- One of the possible
LiteralTypes
-
setType
Changes the way this visitor should retrieve the literal value.- Parameters:
type
- One of the possibleLiteralTypes
-
visit
Description copied from interface:ExpressionVisitor
Visits theAbstractSchemaName
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:ExpressionVisitor
Visits theCollectionMemberDeclaration
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:ExpressionVisitor
Visits theCollectionValuedPathExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:ExpressionVisitor
Visits theEntityTypeLiteral
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:ExpressionVisitor
Visits theFunctionExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:ExpressionVisitor
Visits theIdentificationVariable
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:ExpressionVisitor
Visits theInputParameter
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:ExpressionVisitor
Visits theJoin
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:ExpressionVisitor
Visits theRangeVariableDeclaration
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:ExpressionVisitor
Visits theResultVariable
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:ExpressionVisitor
Visits theStateFieldPathExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:ExpressionVisitor
Visits theStringLiteral
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
Description copied from interface:ExpressionVisitor
Visits theTreatExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visitAbstractPathExpression
-