Class DefaultSemanticValidator.TypeValidator
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.parser.AbstractExpressionVisitor
-
- org.eclipse.persistence.jpa.jpql.tools.DefaultSemanticValidator.TypeValidator
-
- All Implemented Interfaces:
ExpressionVisitor
- Direct Known Subclasses:
DefaultSemanticValidator.BooleanTypeValidator
,DefaultSemanticValidator.NumericTypeValidator
,DefaultSemanticValidator.StringTypeValidator
- Enclosing class:
- DefaultSemanticValidator
protected abstract class DefaultSemanticValidator.TypeValidator extends AbstractExpressionVisitor
The basic validator for validating the type of anExpression
.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
valid
Determines whether the expression that was visited returns a number.
-
Constructor Summary
Constructors Modifier Constructor Description protected
TypeValidator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract boolean
isRightType(java.lang.Object type)
Determines whether the given type is the expected type.void
visit(CaseExpression expression)
Visits theCaseExpression
expression.void
visit(CoalesceExpression expression)
Visits theCoalesceExpression
expression.void
visit(InputParameter expression)
Visits theInputParameter
expression.void
visit(NullExpression expression)
Visits theNullExpression
expression.void
visit(NullIfExpression expression)
Visits theNullIfExpression
expression.void
visit(StateFieldPathExpression expression)
Visits theStateFieldPathExpression
expression.void
visit(SubExpression expression)
Visits theSubExpression
expression.-
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, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
-
-
-
Method Detail
-
isRightType
protected abstract boolean isRightType(java.lang.Object type)
Determines whether the given type is the expected type.- 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 final void visit(CaseExpression expression)
Visits theCaseExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(CoalesceExpression expression)
Visits theCoalesceExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(InputParameter expression)
Visits theInputParameter
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public void visit(NullExpression expression)
Visits theNullExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(NullIfExpression expression)
Visits theNullIfExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(StateFieldPathExpression expression)
Visits theStateFieldPathExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
visit
public final void visit(SubExpression expression)
Visits theSubExpression
expression.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classAbstractExpressionVisitor
- Parameters:
expression
- TheExpression
to visit
-
-