Class DefaultSemanticValidator.NumericTypeValidator
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.parser.AbstractExpressionVisitor
-
- org.eclipse.persistence.jpa.jpql.tools.DefaultSemanticValidator.TypeValidator
-
- org.eclipse.persistence.jpa.jpql.tools.DefaultSemanticValidator.NumericTypeValidator
-
- All Implemented Interfaces:
ExpressionVisitor
- Enclosing class:
- DefaultSemanticValidator
protected class DefaultSemanticValidator.NumericTypeValidator extends DefaultSemanticValidator.TypeValidator
This visitor validates expression that is a numeric literal to make sure the type is an instance of Number.
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.jpa.jpql.tools.DefaultSemanticValidator.TypeValidator
valid
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
NumericTypeValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isRightType(java.lang.Object type)
Determines whether the given type is the expected type.void
visit(AbsExpression expression)
Visits theAbsExpression
expression.void
visit(AdditionExpression expression)
Visits theAdditionExpression
expression.void
visit(ArithmeticFactor expression)
Visits theArithmeticFactor
expression.void
visit(AvgFunction expression)
Visits theAvgFunction
expression.void
visit(CountFunction expression)
Visits theCountFunction
expression.void
visit(DivisionExpression expression)
Visits theDivisionExpression
expression.void
visit(IndexExpression expression)
Visits theIndexExpression
expression.void
visit(LengthExpression expression)
Visits theLengthExpression
expression.void
visit(LocateExpression expression)
Visits theLocateExpression
expression.void
visit(MaxFunction expression)
Visits theMaxFunction
expression.void
visit(MinFunction expression)
Visits theMinFunction
expression.void
visit(ModExpression expression)
Visits theModExpression
expression.void
visit(MultiplicationExpression expression)
Visits theMultiplicationExpression
expression.void
visit(NumericLiteral expression)
Visits theNumericLiteral
expression.void
visit(SizeExpression expression)
Visits theSizeExpression
expression.void
visit(SqrtExpression expression)
Visits theSqrtExpression
expression.void
visit(SubtractionExpression expression)
Visits theSubtractionExpression
expression.void
visit(SumFunction expression)
Visits theSumFunction
expression.-
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.DefaultSemanticValidator.TypeValidator
visit, visit, visit, visit, visit, visit, visit
-
Methods inherited from class org.eclipse.persistence.jpa.jpql.parser.AbstractExpressionVisitor
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
-
-
-
-
Method Detail
-
isRightType
protected boolean isRightType(java.lang.Object type)
Determines whether the given type is the expected type.- Specified by:
isRightType
in classDefaultSemanticValidator.TypeValidator
- Parameters:
type
- The type to validate- Returns:
true
if the given type is of the expected type;false
if it's not the right type
-
visit
public void visit(AbsExpression expression)
Visits theAbsExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(AdditionExpression expression)
Visits theAdditionExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(ArithmeticFactor expression)
Visits theArithmeticFactor
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(AvgFunction expression)
Visits theAvgFunction
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(CountFunction expression)
Visits theCountFunction
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(DivisionExpression expression)
Visits theDivisionExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(IndexExpression expression)
Visits theIndexExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(LengthExpression expression)
Visits theLengthExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(LocateExpression expression)
Visits theLocateExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(MaxFunction expression)
Visits theMaxFunction
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(MinFunction expression)
Visits theMinFunction
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(ModExpression expression)
Visits theModExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(MultiplicationExpression expression)
Visits theMultiplicationExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(NumericLiteral expression)
Visits theNumericLiteral
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(SizeExpression expression)
Visits theSizeExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(SqrtExpression expression)
Visits theSqrtExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(SubtractionExpression expression)
Visits theSubtractionExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(SumFunction expression)
Visits theSumFunction
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
-