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 anExpressionand 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.StringliteralThe literal value retrieved from the visitedExpression.protected LiteralTypetypeTheLiteralTypehelps to determine when traversing anExpressionwhat to retrieve.
-
Constructor Summary
Constructors Modifier Constructor Description protectedLiteralVisitor()Creates a newAbstractLiteralVisitor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LiteralTypegetType()Returns the way this visitor retrieves the literal value.voidsetType(LiteralType type)Changes the way this visitor should retrieve the literal value.voidvisit(AbstractSchemaName expression)Visits theAbstractSchemaNameexpression.voidvisit(CollectionMemberDeclaration expression)Visits theCollectionMemberDeclarationexpression.voidvisit(CollectionValuedPathExpression expression)Visits theCollectionValuedPathExpressionexpression.voidvisit(EntityTypeLiteral expression)Visits theEntityTypeLiteralexpression.voidvisit(FunctionExpression expression)Visits theFunctionExpressionexpression.voidvisit(IdentificationVariable expression)Visits theIdentificationVariableexpression.voidvisit(InputParameter expression)Visits theInputParameterexpression.voidvisit(Join expression)Visits theJoinexpression.voidvisit(RangeVariableDeclaration expression)Visits theRangeVariableDeclarationexpression.voidvisit(ResultVariable expression)Visits theResultVariableexpression.voidvisit(StateFieldPathExpression expression)Visits theStateFieldPathExpressionexpression.voidvisit(StringLiteral expression)Visits theStringLiteralexpression.voidvisit(TreatExpression expression)Visits theTreatExpressionexpression.protected voidvisitAbstractPathExpression(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
TheLiteralTypehelps to determine when traversing anExpressionwhat 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 theAbstractSchemaNameexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(CollectionMemberDeclaration expression)
Visits theCollectionMemberDeclarationexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(CollectionValuedPathExpression expression)
Visits theCollectionValuedPathExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(EntityTypeLiteral expression)
Visits theEntityTypeLiteralexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(FunctionExpression expression)
Visits theFunctionExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(IdentificationVariable expression)
Visits theIdentificationVariableexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(InputParameter expression)
Visits theInputParameterexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(Join expression)
Visits theJoinexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(RangeVariableDeclaration expression)
Visits theRangeVariableDeclarationexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(ResultVariable expression)
Visits theResultVariableexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(StateFieldPathExpression expression)
Visits theStateFieldPathExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(StringLiteral expression)
Visits theStringLiteralexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(TreatExpression expression)
Visits theTreatExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visitAbstractPathExpression
protected void visitAbstractPathExpression(AbstractPathExpression expression)
-
-