Class JPQLCompiler

    • Method Detail

      • compile

        public QueryCompilation compile​(Map parameters,
                                        Map subqueryMap)
        Method to compile the query, and return the compiled results.
        Specified by:
        compile in class JavaQueryCompiler
        parameters - the parameter map of values keyed by param name
        subqueryMap - Map of subquery variables, keyed by the subquery name
        The compiled query
      • resolveClass

        public Class resolveClass​(String className)
        Method to perform a lookup of the class name from the input name. Makes use of the query "imports" and the lookup to "entity name".
        Specified by:
        resolveClass in interface SymbolResolver
        resolveClass in class JavaQueryCompiler
        className - Name of the class
        The class corresponding to this name
        ClassNotResolvedException - thrown if not resolvable using imports or entity name
      • supportsImplicitVariables

        public boolean supportsImplicitVariables()
        Description copied from interface: SymbolResolver
        Whether we should accept implicit variables in the query. JDOQL supports variables, yet JPQL doesn't. Also in JDOQL if the user supplies some explicit variables then it doesn't allow implicit variables.
        Whether to support implicit variables
      • caseSensitiveSymbolNames

        public boolean caseSensitiveSymbolNames()
        Description copied from interface: SymbolResolver
        Whether names of symbols are case-sensitive (e.g JDOQL returns true, but JPQL returns false).
        Whether case sensitive
      • getLanguage

        public String getLanguage()
        Accessor for the query language name.
        Specified by:
        getLanguage in class JavaQueryCompiler
        Name of the query language.
      • isKeyword

        protected boolean isKeyword​(String name)
        Method to return if the supplied name is a keyword. Keywords can only appear at particular places in a query so we need to detect for valid queries.
        Specified by:
        isKeyword in class JavaQueryCompiler
        name - The name
        Whether it is a keyword