Class ExpressionFactory

    • Constructor Detail

      • ExpressionFactory

        protected ExpressionFactory​(java.lang.String id,
                                    java.lang.String... identifiers)
        Creates a new ExpressionFactory.
        Parameters:
        id - The unique identifier of this ExpressionFactory
        identifiers - The JPQL identifiers handled by this factory
        Throws:
        java.lang.NullPointerException - The given unique identifier cannot be null or the list of JPQL identifiers was null
    • Method Detail

      • buildExpression

        protected abstract AbstractExpression buildExpression​(AbstractExpression parent,
                                                              WordParser wordParser,
                                                              java.lang.String word,
                                                              JPQLQueryBNF queryBNF,
                                                              AbstractExpression expression,
                                                              boolean tolerant)
        Creates a new Expression.
        Parameters:
        parent - The parent AbstractExpression
        wordParser - The text to parse based on the current position of the cursor
        word - The current word being parsed
        queryBNF - The BNF grammar that was used to identifier this factory to be capable to parse a portion of the query
        expression - During the parsing, it is possible the first part of an expression was parsed which needs to be used as a sub-expression of the newly created expression
        Returns:
        A new AbstractExpression representing the portion or the totality of the text held by WordParser starting at the cursor position
      • equals

        public final boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • getExpressionRegistry

        public final ExpressionRegistry getExpressionRegistry()
        Returns the registry containing the JPQLQueryBNFs and the ExpressionFactories that are used to properly parse a JPQL query.
        Returns:
        The registry containing the information related to the JPQL grammar
      • getId

        public final java.lang.String getId()
        Returns the unique identifier of this ExpressionFactory.
        Returns:
        The identifier used to register this ExpressionFactory with ExpressionRegistry
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • identifiers

        public final java.lang.String[] identifiers()
        Returns the JPQL identifiers handled by this factory.
        Returns:
        The list of JPQL identifiers this factory knows how to parse
      • toString

        public final java.lang.String toString()
        Overrides:
        toString in class java.lang.Object