com.akiban.sql.parser
Class NodeFactory

java.lang.Object
  extended by com.akiban.sql.parser.NodeFactory
Direct Known Subclasses:
NodeFactoryImpl

public abstract class NodeFactory
extends Object

This is an interface for NodeFactories.

There is one of these per parser context, possibly wrapped for higher-level uses.


Constructor Summary
NodeFactory()
           
 
Method Summary
 QueryTreeNode copyNode(QueryTreeNode node, SQLParserContext pc)
          Make a deep copy of the given node for the given context, which may not be the same as the node's context.
 Object copyUserData(QueryTreeNode node, Object userData)
          Copy node's user data.
 QueryTreeNode getCreateAliasNode(Object aliasName, Object targetName, Object aliasSpecificInfo, AliasInfo.Type aliasType, Boolean createOrReplace, SQLParserContext pc)
          Get one of the several types of create alias nodes.
 QueryTreeNode getNode(int nodeType, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14, SQLParserContext pc)
          Get a node that takes fourteen initializer arguments.
 QueryTreeNode getNode(int nodeType, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, SQLParserContext pc)
          Get a node that takes thirteen initializer arguments.
 QueryTreeNode getNode(int nodeType, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, SQLParserContext pc)
          Get a node that takes twelve initializer arguments.
 QueryTreeNode getNode(int nodeType, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, SQLParserContext pc)
          Get a node that takes eleven initializer arguments.
 QueryTreeNode getNode(int nodeType, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, SQLParserContext pc)
          Get a node that takes ten initializer arguments.
 QueryTreeNode getNode(int nodeType, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, SQLParserContext pc)
          Get a node that takes nine initializer arguments.
 QueryTreeNode getNode(int nodeType, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, SQLParserContext pc)
          Get a node that takes eight initializer arguments.
 QueryTreeNode getNode(int nodeType, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, SQLParserContext pc)
          Get a node that takes seven initializer arguments.
 QueryTreeNode getNode(int nodeType, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, SQLParserContext pc)
          Get a node that takes six initializer arguments.
 QueryTreeNode getNode(int nodeType, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, SQLParserContext pc)
          Get a node that takes five initializer arguments.
 QueryTreeNode getNode(int nodeType, Object arg1, Object arg2, Object arg3, Object arg4, SQLParserContext pc)
          Get a node that takes four initializer arguments.
 QueryTreeNode getNode(int nodeType, Object arg1, Object arg2, Object arg3, SQLParserContext pc)
          Get a node that takes three initializer arguments.
 QueryTreeNode getNode(int nodeType, Object arg1, Object arg2, SQLParserContext pc)
          Get a node that takes two initializer arguments.
 QueryTreeNode getNode(int nodeType, Object arg1, SQLParserContext pc)
          Get a node that takes one initializer argument.
abstract  QueryTreeNode getNode(int nodeType, SQLParserContext pc)
          Get a node that takes no initializer arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeFactory

public NodeFactory()
Method Detail

getNode

public abstract QueryTreeNode getNode(int nodeType,
                                      SQLParserContext pc)
                               throws StandardException
Get a node that takes no initializer arguments.

Parameters:
nodeType - Identifier for the type of node.
pc - A SQLParserContext
Returns:
A new QueryTree node.
Throws:
StandardException - Thrown on error.

getNode

public final QueryTreeNode getNode(int nodeType,
                                   Object arg1,
                                   SQLParserContext pc)
                            throws StandardException
Get a node that takes one initializer argument.

Parameters:
nodeType - Identifier for the type of node.
arg1 - The initializer argument
pc - A SQLParserContext
Returns:
A new QueryTree node.
Throws:
StandardException - Thrown on error.

getNode

public final QueryTreeNode getNode(int nodeType,
                                   Object arg1,
                                   Object arg2,
                                   SQLParserContext pc)
                            throws StandardException
Get a node that takes two initializer arguments.

Parameters:
nodeType - Identifier for the type of node.
arg1 - An initializer argument
arg2 - An initializer argument
pc - A SQLParserContext
Returns:
A new QueryTree node.
Throws:
StandardException - Thrown on error.

getNode

public final QueryTreeNode getNode(int nodeType,
                                   Object arg1,
                                   Object arg2,
                                   Object arg3,
                                   SQLParserContext pc)
                            throws StandardException
Get a node that takes three initializer arguments.

Parameters:
nodeType - Identifier for the type of node.
arg1 - An initializer argument
arg2 - An initializer argument
arg3 - An initializer argument
pc - A SQLParserContext
Returns:
A new QueryTree node.
Throws:
StandardException - Thrown on error.

getNode

public final QueryTreeNode getNode(int nodeType,
                                   Object arg1,
                                   Object arg2,
                                   Object arg3,
                                   Object arg4,
                                   SQLParserContext pc)
                            throws StandardException
Get a node that takes four initializer arguments.

Parameters:
nodeType - Identifier for the type of node.
arg1 - An initializer argument
arg2 - An initializer argument
arg3 - An initializer argument
arg4 - An initializer argument
pc - A SQLParserContext
Returns:
A new QueryTree node.
Throws:
StandardException - Thrown on error.

getNode

public final QueryTreeNode getNode(int nodeType,
                                   Object arg1,
                                   Object arg2,
                                   Object arg3,
                                   Object arg4,
                                   Object arg5,
                                   SQLParserContext pc)
                            throws StandardException
Get a node that takes five initializer arguments.

Parameters:
nodeType - Identifier for the type of node.
arg1 - An initializer argument
arg2 - An initializer argument
arg3 - An initializer argument
arg4 - An initializer argument
arg5 - An initializer argument
pc - A SQLParserContext
Returns:
A new QueryTree node.
Throws:
StandardException - Thrown on error.

getNode

public final QueryTreeNode getNode(int nodeType,
                                   Object arg1,
                                   Object arg2,
                                   Object arg3,
                                   Object arg4,
                                   Object arg5,
                                   Object arg6,
                                   SQLParserContext pc)
                            throws StandardException
Get a node that takes six initializer arguments.

Parameters:
nodeType - Identifier for the type of node.
arg1 - An initializer argument
arg2 - An initializer argument
arg3 - An initializer argument
arg4 - An initializer argument
arg5 - An initializer argument
arg6 - An initializer argument
pc - A SQLParserContext
Returns:
A new QueryTree node.
Throws:
StandardException - Thrown on error.

getNode

public final QueryTreeNode getNode(int nodeType,
                                   Object arg1,
                                   Object arg2,
                                   Object arg3,
                                   Object arg4,
                                   Object arg5,
                                   Object arg6,
                                   Object arg7,
                                   SQLParserContext pc)
                            throws StandardException
Get a node that takes seven initializer arguments.

Parameters:
nodeType - Identifier for the type of node.
arg1 - An initializer argument
arg2 - An initializer argument
arg3 - An initializer argument
arg4 - An initializer argument
arg5 - An initializer argument
arg6 - An initializer argument
arg7 - An initializer argument
pc - A SQLParserContext
Returns:
A new QueryTree node.
Throws:
StandardException - Thrown on error.

getNode

public final QueryTreeNode getNode(int nodeType,
                                   Object arg1,
                                   Object arg2,
                                   Object arg3,
                                   Object arg4,
                                   Object arg5,
                                   Object arg6,
                                   Object arg7,
                                   Object arg8,
                                   SQLParserContext pc)
                            throws StandardException
Get a node that takes eight initializer arguments.

Parameters:
nodeType - Identifier for the type of node.
arg1 - An initializer argument
arg2 - An initializer argument
arg3 - An initializer argument
arg4 - An initializer argument
arg5 - An initializer argument
arg6 - An initializer argument
arg7 - An initializer argument
arg8 - An initializer argument
pc - A SQLParserContext
Returns:
A new QueryTree node.
Throws:
StandardException - Thrown on error.

getNode

public final QueryTreeNode getNode(int nodeType,
                                   Object arg1,
                                   Object arg2,
                                   Object arg3,
                                   Object arg4,
                                   Object arg5,
                                   Object arg6,
                                   Object arg7,
                                   Object arg8,
                                   Object arg9,
                                   SQLParserContext pc)
                            throws StandardException
Get a node that takes nine initializer arguments.

Parameters:
nodeType - Identifier for the type of node.
arg1 - An initializer argument
arg2 - An initializer argument
arg3 - An initializer argument
arg4 - An initializer argument
arg5 - An initializer argument
arg6 - An initializer argument
arg7 - An initializer argument
arg8 - An initializer argument
arg9 - An initializer argument
pc - A SQLParserContext
Returns:
A new QueryTree node.
Throws:
StandardException - Thrown on error.

getNode

public final QueryTreeNode getNode(int nodeType,
                                   Object arg1,
                                   Object arg2,
                                   Object arg3,
                                   Object arg4,
                                   Object arg5,
                                   Object arg6,
                                   Object arg7,
                                   Object arg8,
                                   Object arg9,
                                   Object arg10,
                                   SQLParserContext pc)
                            throws StandardException
Get a node that takes ten initializer arguments.

Parameters:
nodeType - Identifier for the type of node.
arg1 - An initializer argument
arg2 - An initializer argument
arg3 - An initializer argument
arg4 - An initializer argument
arg5 - An initializer argument
arg6 - An initializer argument
arg7 - An initializer argument
arg8 - An initializer argument
arg9 - An initializer argument
arg10 - An initializer argument
pc - A SQLParserContext
Returns:
A new QueryTree node.
Throws:
StandardException - Thrown on error.

getNode

public final QueryTreeNode getNode(int nodeType,
                                   Object arg1,
                                   Object arg2,
                                   Object arg3,
                                   Object arg4,
                                   Object arg5,
                                   Object arg6,
                                   Object arg7,
                                   Object arg8,
                                   Object arg9,
                                   Object arg10,
                                   Object arg11,
                                   SQLParserContext pc)
                            throws StandardException
Get a node that takes eleven initializer arguments.

Parameters:
nodeType - Identifier for the type of node.
arg1 - An initializer argument
arg2 - An initializer argument
arg3 - An initializer argument
arg4 - An initializer argument
arg5 - An initializer argument
arg6 - An initializer argument
arg7 - An initializer argument
arg8 - An initializer argument
arg9 - An initializer argument
arg10 - An initializer argument
arg11 - An initializer argument
pc - A SQLParserContext
Returns:
A new QueryTree node.
Throws:
StandardException - Thrown on error.

getNode

public final QueryTreeNode getNode(int nodeType,
                                   Object arg1,
                                   Object arg2,
                                   Object arg3,
                                   Object arg4,
                                   Object arg5,
                                   Object arg6,
                                   Object arg7,
                                   Object arg8,
                                   Object arg9,
                                   Object arg10,
                                   Object arg11,
                                   Object arg12,
                                   SQLParserContext pc)
                            throws StandardException
Get a node that takes twelve initializer arguments.

Parameters:
nodeType - Identifier for the type of node.
arg1 - An initializer argument
arg2 - An initializer argument
arg3 - An initializer argument
arg4 - An initializer argument
arg5 - An initializer argument
arg6 - An initializer argument
arg7 - An initializer argument
arg8 - An initializer argument
arg9 - An initializer argument
arg10 - An initializer argument
arg11 - An initializer argument
arg12 - An initializer argument
pc - A SQLParserContext
Returns:
A new QueryTree node.
Throws:
StandardException - Thrown on error.

getNode

public final QueryTreeNode getNode(int nodeType,
                                   Object arg1,
                                   Object arg2,
                                   Object arg3,
                                   Object arg4,
                                   Object arg5,
                                   Object arg6,
                                   Object arg7,
                                   Object arg8,
                                   Object arg9,
                                   Object arg10,
                                   Object arg11,
                                   Object arg12,
                                   Object arg13,
                                   SQLParserContext pc)
                            throws StandardException
Get a node that takes thirteen initializer arguments.

Parameters:
nodeType - Identifier for the type of node.
arg1 - An initializer argument
arg2 - An initializer argument
arg3 - An initializer argument
arg4 - An initializer argument
arg5 - An initializer argument
arg6 - An initializer argument
arg7 - An initializer argument
arg8 - An initializer argument
arg9 - An initializer argument
arg10 - An initializer argument
arg11 - An initializer argument
arg12 - An initializer argument
arg13 - An initializer argument
pc - A SQLParserContext
Returns:
A new QueryTree node.
Throws:
StandardException - Thrown on error.

getNode

public final QueryTreeNode getNode(int nodeType,
                                   Object arg1,
                                   Object arg2,
                                   Object arg3,
                                   Object arg4,
                                   Object arg5,
                                   Object arg6,
                                   Object arg7,
                                   Object arg8,
                                   Object arg9,
                                   Object arg10,
                                   Object arg11,
                                   Object arg12,
                                   Object arg13,
                                   Object arg14,
                                   SQLParserContext pc)
                            throws StandardException
Get a node that takes fourteen initializer arguments.

Parameters:
nodeType - Identifier for the type of node.
arg1 - An initializer argument
arg2 - An initializer argument
arg3 - An initializer argument
arg4 - An initializer argument
arg5 - An initializer argument
arg6 - An initializer argument
arg7 - An initializer argument
arg8 - An initializer argument
arg9 - An initializer argument
arg10 - An initializer argument
arg11 - An initializer argument
arg12 - An initializer argument
arg13 - An initializer argument
arg14 - An initializer argument
pc - A SQLParserContext
Returns:
A new QueryTree node.
Throws:
StandardException - Thrown on error.

copyNode

public QueryTreeNode copyNode(QueryTreeNode node,
                              SQLParserContext pc)
                       throws StandardException
Make a deep copy of the given node for the given context, which may not be the same as the node's context.

Throws:
StandardException

copyUserData

public Object copyUserData(QueryTreeNode node,
                           Object userData)
                    throws StandardException
Copy node's user data. Default implementation just does a pointer copy. Binding implementation needs to provide one that deals with any references it has.

Throws:
StandardException

getCreateAliasNode

public QueryTreeNode getCreateAliasNode(Object aliasName,
                                        Object targetName,
                                        Object aliasSpecificInfo,
                                        AliasInfo.Type aliasType,
                                        Boolean createOrReplace,
                                        SQLParserContext pc)
                                 throws StandardException
Get one of the several types of create alias nodes. Carved out of parser so this could be used by ALTER PUBLICATION.

Parameters:
aliasName - The name of the alias
targetName - The full path/method name
aliasSpecificInfo - The full path of the target method name, if any
aliasType - The type of alias to create
delimitedIdentifier - Whether or not to treat the class name as a delimited identifier if trying to resolve it as a class alias.
pc - A SQLParserContext
Returns:
A CreateAliasNode matching the given parameters
Throws:
StandardException - Thrown on error


Copyright © 2013 Akiban Technologies, Inc. All rights reserved.