Class DefaultJPQLQueryContext


  • public class DefaultJPQLQueryContext
    extends JPQLQueryContext
    This context is used to store information related to the JPQL query.
     IQuery externalQuery = ...;
    
     JPQLQueryContext context = new JPQLQueryContext(DefaultJPQLGrammar.instance());
     context.setQuery(query);
    If the JPQL query is already parsed, then the context can use it and it needs to be set before setting the IQuery:
     JPQLExpression jpqlExpression = ...;
    
     JPQLQueryContext context = new JPQLQueryContext(DefaultJPQLGrammar.instance());
     context.setJPQLExpression(jpqlExpression);
     context.setQuery(query);
    Since:
    2.4
    Version:
    2.4
    Author:
    Pascal Filion
    • Constructor Detail

      • DefaultJPQLQueryContext

        public DefaultJPQLQueryContext​(JPQLGrammar jpqlGrammar)
        Creates a new DefaultJPQLQueryContext.
    • Method Detail

      • getParent

        public DefaultJPQLQueryContext getParent()
        Returns the parent context if the current context is not the root context.
        Overrides:
        getParent in class JPQLQueryContext
        Returns:
        The parent context or null if the current context is the root