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.
- Since:
- 2.4
- Version:
- 2.5
- Author:
- Pascal Filion
-
-
Field Summary
Fields Modifier and Type Field Description 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 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)
Description copied from interface:ExpressionVisitorVisits theAbstractSchemaNameexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(CollectionMemberDeclaration expression)
Description copied from interface:ExpressionVisitorVisits theCollectionMemberDeclarationexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(CollectionValuedPathExpression expression)
Description copied from interface:ExpressionVisitorVisits theCollectionValuedPathExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(EntityTypeLiteral expression)
Description copied from interface:ExpressionVisitorVisits theEntityTypeLiteralexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(FunctionExpression expression)
Description copied from interface:ExpressionVisitorVisits theFunctionExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(IdentificationVariable expression)
Description copied from interface:ExpressionVisitorVisits theIdentificationVariableexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(InputParameter expression)
Description copied from interface:ExpressionVisitorVisits theInputParameterexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(Join expression)
Description copied from interface:ExpressionVisitorVisits theJoinexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(RangeVariableDeclaration expression)
Description copied from interface:ExpressionVisitorVisits theRangeVariableDeclarationexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(ResultVariable expression)
Description copied from interface:ExpressionVisitorVisits theResultVariableexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(StateFieldPathExpression expression)
Description copied from interface:ExpressionVisitorVisits theStateFieldPathExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(StringLiteral expression)
Description copied from interface:ExpressionVisitorVisits theStringLiteralexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visit
public void visit(TreatExpression expression)
Description copied from interface:ExpressionVisitorVisits theTreatExpressionexpression.- Specified by:
visitin interfaceExpressionVisitor- Overrides:
visitin classAnonymousExpressionVisitor- Parameters:
expression- TheExpressionto visit
-
visitAbstractPathExpression
protected void visitAbstractPathExpression(AbstractPathExpression expression)
-
-