Class NodeFactoryImpl

  • All Implemented Interfaces:
    NodeFactory

    public class NodeFactoryImpl
    extends Object
    implements NodeFactory
    INTERNAL

    Purpose: Implements a node factory used by the EJBQLParser class.

    Responsibilities:

    • Create EJBQLParseTree instances for EJBQL SELECT-, UPDATE- and DELETE statements (see methods newSelectStatement, newUpdateStatement and newDeleteStatement).
    • Any new<XXX> method returns an instance of the appropriate Node subclass.
    • The relationship to the child nodes passed as arguments are automatically initialized.
    • Note, this implementation has a state managing the parse tree context and a list of parameter names for the current parse tree. This state needs to be initialized before the same node factory implementation instance may be used to create a second parse tree (see methods initContext and initParameters).
    • The implementation automatically adds the list of parameters to the created parse tree.
    • The implementation automatically sets the parse tree context for any created major node.