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
public abstract class LiteralVisitor extends AnonymousExpressionVisitor
This visitor traverses anExpression
and retrieves the "literal" value. The literal to retrieve depends on thetype
. 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.
- Version:
- 2.5
- Author:
- Pascal Filion
- Since:
- 2.4
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
literal
The literal value retrieved from the visitedExpression
.protected LiteralType
type
TheLiteralType
helps to determine when traversing anExpression
what to retrieve.
-
Constructor Summary
Constructors Modifier Constructor Description protected
LiteralVisitor()
Creates a newAbstractLiteralVisitor
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LiteralType
getType()
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
visit(Join expression)
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
-
-
-
-
Field Detail
-
literal
public java.lang.String literal
The literal value retrieved from the visitedExpression
.
-
type
protected LiteralType type
TheLiteralType
helps to determine when traversing anExpression
what to retrieve.
-
-
Method Detail
-
getType
public LiteralType getType()
Returns the way this visitor retrieves the literal value.- Returns:
- One of the possible
LiteralTypes
-
setType
public void setType(LiteralType type)
Changes the way this visitor should retrieve the literal value.- Parameters:
type
- One of the possibleLiteralTypes
-
visit
public void visit(AbstractSchemaName expression)
Visits theAbstractSchemaName
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(CollectionMemberDeclaration expression)
Visits theCollectionMemberDeclaration
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(CollectionValuedPathExpression expression)
Visits theCollectionValuedPathExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(EntityTypeLiteral expression)
Visits theEntityTypeLiteral
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(FunctionExpression expression)
Visits theFunctionExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(IdentificationVariable expression)
Visits theIdentificationVariable
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(InputParameter expression)
Visits theInputParameter
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(Join expression)
Visits theJoin
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(RangeVariableDeclaration expression)
Visits theRangeVariableDeclaration
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(ResultVariable expression)
Visits theResultVariable
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(StateFieldPathExpression expression)
Visits theStateFieldPathExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(StringLiteral expression)
Visits theStringLiteral
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(TreatExpression expression)
Visits theTreatExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAnonymousExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visitAbstractPathExpression
protected void visitAbstractPathExpression(AbstractPathExpression expression)
-
-