For instance, the function AVG accepts a state field path. The property it represents has
to be of numeric type. AVG(e.name) is parsable but is not semantically valid because the
type of name is a string (the property signature is: "private String name").
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.
DefaultGrammarValidator
| Modifier and Type | Class and Description |
|---|---|
| protected class | DefaultSemanticValidator.BooleanTypeValidator
This visitor validates expression that is a boolean literal to make sure the type is a Boolean. |
| protected static class | |
| protected class | DefaultSemanticValidator.NumericTypeValidator
This visitor validates expression that is a numeric literal to make sure the type is an instance of Number. |
| protected static class | |
| protected class | DefaultSemanticValidator.StringTypeValidator
This visitor validates that the |
| protected abstract class | DefaultSemanticValidator.TypeValidator
The basic validator for validating the type of an |
| protected static class |
| Modifier and Type | Field and Description |
|---|---|
| protected DefaultSemanticValidator. | nullValueVisitor
This validator determines whether the |
| protected DefaultSemanticValidator. | updateClauseAbstractSchemaNameFinder
This finder is responsible to retrieve the abstract schema name from the UPDATE range declaration expression. |
| protected Map | validators
Hides org. TypeVlidators mapped to their Java class.
|
| Access | Constructor and Description |
|---|---|
| public | DefaultSemanticValidator(JPQLQueryContext
The context used to query information about the JPQL query queryContext)Creates a new |
| public | DefaultSemanticValidator(SemanticValidatorHelper
The given helper allows the validator to access the JPA artifacts without using
Hermes SPI directly helper)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | |
| protected LiteralVisitor | buildLiteralVisitor()
Implements abstract org. |
| protected AbstractValidator. | buildOwningClauseVisitor()
Implements abstract org. Expression and stops at
the first Expression that is a clause.
|
| protected DefaultSemanticValidator. | |
| protected AbstractSchemaName | |
| protected DefaultSemanticValidator. | |
| protected Object | |
| protected ITypeHelper | |
| protected DefaultSemanticValidator. | |
| protected DefaultSemanticValidator. | |
| protected void | initialize()
Overrides org. |
| protected boolean | isBooleanType(Expression
The expression)Expression to validateDetermines whether the given
|
| protected boolean | |
| protected boolean | |
| protected boolean | isIntegralType(Expression
The expression)Expression to validateDetermines whether the given
|
| protected boolean | |
| protected boolean | isNumericType(Expression
The expression)Expression to validateDetermines whether the given
|
| protected boolean | isStringType(Expression
The expression)Expression to validateDetermines whether the given
|
| protected boolean | isValid(Expression
The expression, Class<? extends DefaultSemanticValidator.Expression to validateThe Java class of the validatorClass)TypeValidator that will determine if the
given Expression has the right typeDetermines whether the given |
| protected boolean | |
| protected AbstractSemanticValidator. | selectClausePathExpressionPathType()
Implements abstract org. SELECT clause.
|
| protected boolean | validateAbsExpression(AbsExpression
The expression)AbsExpression to validate by validating its encapsulated
expressionOverrides org. ABS expression.
|
| protected int | validateArithmeticExpression(ArithmeticExpression
The expression, String ArithmeticExpression to validateThe key used to describe the left expression does not
have a valid type leftExpressionWrongTypeMessageKey, String The key used to describe the right expression does
not have a valid type rightExpressionWrongTypeMessageKey)Overrides org. ArithmeticExpression.
|
| protected boolean | validateAvgFunction(AvgFunction
The expression)AvgFunction to validate by validating its encapsulated expressionOverrides org. AVG expression.
|
| protected int | validateBetweenExpression(BetweenExpression
The expression)BetweenExpression to validateOverrides org. BetweenExpression.
|
| protected boolean | validateBooleanType(Expression
The expression, String Expression to validateThe key used to retrieve the localized message describing the problem messageKey)Determines whether the given
|
| protected int | validateCollectionMemberExpression(CollectionMemberExpression
The expression)CollectionMemberExpression to validateOverrides org. CollectionMemberExpression.
|
| protected boolean | validateComparisonExpression(ComparisonExpression
The expression)ConcatExpression to validate by validating its
left and right expressionsOverrides org. ComparisonExpression.
|
| protected boolean | validateConcatExpression(ConcatExpression
The expression)ConcatExpression to validate by validating its encapsulated expressionOverrides org. CONCAT expression.
|
| protected void | validateConstructorExpression(ConstructorExpression
The expression)ConstructorExpression to validateOverrides org. ConstructorExpression.
|
| protected void | validateCountFunction(CountFunction
The expression)CountFunction to validateOverrides org. CountFunction.
|
| protected void | validateEntryExpression(EntryExpression
The expression)EntryExpression to validateOverrides org. EntryExpression.
|
| protected boolean | validateIdentificationVariable(IdentificationVariable
The expression, String IdentificationVariable that is being visitedThe actual identification variable, which is never an empty string variable)Overrides org. |
| protected boolean | Returns: false if the given expression was validated and is invalid;
true otherwiseThe expression, String Expression to validateThe unique identifier of the query BNF used to validate the type queryBNF, String The key used to retrieve the localized message describing the problem messageKey)Determines whether the given
|
| protected void | validateKeyExpression(KeyExpression
The expression)KeyExpression to validateOverrides org. KeyExpression.
|
| protected boolean | validateLengthExpression(LengthExpression
The expression)LengthExpression to validate by validating its encapsulated expressionOverrides org. LENGTH expression.
|
| protected int | validateLocateExpression(LocateExpression
The expression)LocateExpression to validate by validating its encapsulated expressionOverrides org. LOCATE expression.
|
| protected boolean | validateLowerExpression(LowerExpression
The expression)LowerExpression to validate by validating its encapsulated expressionOverrides org. LOWER expression.
|
| protected void | |
| protected int | validateModExpression(ModExpression
The expression)ModExpression to validate by validating its encapsulated expressionOverrides org. MOD expression.
|
| protected void | validateNotExpression(NotExpression
The expression)NotExpression to validateOverrides org. NotExpression.
|
| protected void | validateNullComparisonExpression(NullComparisonExpression
The expression)NullComparisonExpression to validateOverrides org. NullComparisonExpression.
|
| protected boolean | Returns: false if the given expression was validated and is invalid;
true otherwiseThe expression, String Expression to validateThe key used to retrieve the localized message describing the problem messageKey)Determines whether the given
|
| protected boolean | validateSqrtExpression(SqrtExpression
The expression)SqrtExpression to validate by validating its encapsulated expressionOverrides org. SQRT expression.
|
| protected boolean | Returns: false if the given expression was validated and is invalid;
true otherwiseThe expression, String Expression to validateThe key used to retrieve the localized message describing the problem messageKey)Determines whether the given
|
| protected int | validateSubstringExpression(SubstringExpression
The expression)SubstringExpression to validate by validating its encapsulated expressionOverrides org. SUBSTRING expression.
|
| protected boolean | validateSumFunction(SumFunction
The expression)ModExpression to validate by validating its encapsulated expressionOverrides org. MOD expression.
|
| protected boolean | validateUpdateItem(UpdateItem
UpdateItem to validate its path expressionOverrides org. UpdateItem by validating the traversability of the path
expression.
|
| protected void | |
| protected boolean | validateUpperExpression(UpperExpression
The expression)UpperExpression to validate by validating its encapsulated expressionOverrides org. UPPER expression.
|
| protected void | validateValueExpression(ValueExpression
The expression)ValueExpression to validateOverrides org. ValueExpression.
|