Class VirtualJPQLQueryBNF


  • public final class VirtualJPQLQueryBNF
    extends JPQLQueryBNF
    This JPQLQueryBNF can be used as a virtual BNF, which can wrap another BNF or BNFs and modify the default behavior.

    The unique identifier for this BNF is automatically generated and can be retrieved with JPQLQueryBNF.getId().

    Once this BNF is no longer needed, dispose() needs to be called.

    Version:
    2.4
    Author:
    Pascal Filion
    Since:
    2.4
    • Constructor Detail

      • VirtualJPQLQueryBNF

        public VirtualJPQLQueryBNF​(JPQLGrammar jpqlGrammar)
        Creates a new VirtualJPQLQueryBNF.
        Parameters:
        jpqlGrammar - The JPQLGrammar to integrate this virtual query BNF
        Throws:
        java.lang.NullPointerException - If the given JPQLGrammar is null
    • Method Detail

      • dispose

        public void dispose()
        Disposes this "virtual" query BNF.
      • registerFactory

        public void registerFactory​(java.lang.String expressionFactoryId)
        Registers a unique identifier that will be used to create the Expression representing this BNF rule.
        Parameters:
        expressionFactoryId - The unique identifier that is responsible to create the Expression for this BNF rule
      • registerQueryBNF

        public void registerQueryBNF​(java.lang.String queryBNFId)
        Registers the unique identifier of the BNF rule as a child of this BNF rule.
        Parameters:
        queryBNFId - The unique identifier of the BNF rule
        Throws:
        java.lang.NullPointerException - The queryBNFId cannot be null