Class DefaultGrammarValidator

All Implemented Interfaces:
ExpressionVisitor

public class DefaultGrammarValidator extends AbstractGrammarValidator
This validator is responsible to validate a JPQL query grammatically purely based on the JPA specification document.
Since:
2.4
Version:
2.5
See Also:
  • Constructor Details

    • DefaultGrammarValidator

      public DefaultGrammarValidator(JPQLGrammar jpqlGrammar)
      Creates a new DefaultGrammarValidator.
      Parameters:
      jpqlGrammar - The JPQLGrammar that defines how the JPQL query was parsed
  • Method Details

    • buildLiteralVisitor

      protected LiteralVisitor buildLiteralVisitor()
      Description copied from class: AbstractValidator
      Creates the visitor that can retrieve some information about various literal.
      Specified by:
      buildLiteralVisitor in class AbstractValidator
      Returns:
      A new LiteralVisitor
    • isJoinFetchIdentifiable

      protected boolean isJoinFetchIdentifiable()
      Description copied from class: AbstractGrammarValidator
      Determines whether a JOIN FETCH expression can be identified by with an identification variable or not.
      Specified by:
      isJoinFetchIdentifiable in class AbstractGrammarValidator
      Returns:
      true if the expression can have an identification variable; false otherwise
    • isSubqueryAllowedAnywhere

      protected boolean isSubqueryAllowedAnywhere()
      Description copied from class: AbstractGrammarValidator
      Determines whether a subquery can be used in any clause of the top-level query.
      Specified by:
      isSubqueryAllowedAnywhere in class AbstractGrammarValidator
      Returns:
      true if a subquery can be defined in any clause; false if it can only be used within the WHERE and HAVING defined by the JPA 1.0 and 2.0 specification document