dsql.parser
Class DMNode

java.lang.Object
  extended bydsql.parser.SimpleNode
      extended bydsql.parser.DMNode
All Implemented Interfaces:
Node
Direct Known Subclasses:
ASTArrayIndex, ASTAssignment, ASTBinaryOperator, ASTDot, ASTExit, ASTForEach, ASTFunction, ASTIf, ASTJava, ASTPrint, ASTReturn, ASTSendEmail, ASTStringExpr, ASTSub, ASTSubCall, ASTTableUpdate, ASTVariable, ASTWhile, ASTXMLElement

public abstract class DMNode
extends SimpleNode

A node element; this is the superclass of all parsed elements


Field Summary
 
Fields inherited from class dsql.parser.SimpleNode
children, id, parent, parser
 
Constructor Summary
DMNode(DMNode toCopy)
           
DMNode(int id)
           
DMNode(Parser p, int id)
           
 
Method Summary
abstract  Value execute()
          Execute a Node
 Value executeArgument(int i)
           
 java.lang.Object executeArgumentAsClass(int i, java.lang.Class cl, boolean tryToCast)
          Execute argument and ensure it is an instance of class cl
 ColumnHolder executeArgumentColumnHolder(int i)
           
 Value executeArgumentNonNull(int i)
          Execute argument and ensure it returns a value
 RecordHolder executeArgumentRecordHolder(int i)
           
 TableResult executeArgumentTable(int i)
           
 Value executeWithCatch()
          Execute a Node
protected  ASTXMLElement executeXML()
           
 DMNode getArgument(int i)
           
 DSQL getCaller()
           
 ASTDsql getDsqlParent()
           
 int getLine()
           
 ASTDoc getRoot()
           
 java.lang.String getString()
           
 boolean hasArgument(int i)
           
 void jjtInsertFirstChild(Node n)
           
 void jjtSetChild(int i, Node n)
           
 void setCaller(DSQL _caller)
           
 void setLine(int _line)
           
 
Methods inherited from class dsql.parser.SimpleNode
dump, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DMNode

public DMNode(int id)

DMNode

public DMNode(Parser p,
              int id)

DMNode

public DMNode(DMNode toCopy)
Method Detail

getCaller

public DSQL getCaller()

setCaller

public void setCaller(DSQL _caller)

jjtInsertFirstChild

public void jjtInsertFirstChild(Node n)

jjtSetChild

public void jjtSetChild(int i,
                        Node n)

getRoot

public ASTDoc getRoot()

getDsqlParent

public ASTDsql getDsqlParent()

setLine

public void setLine(int _line)

getLine

public int getLine()

execute

public abstract Value execute()
                       throws ExecuteException
Execute a Node

Throws:
ExecuteException - If an error occurs during execution

executeWithCatch

public Value executeWithCatch()
                       throws ExecuteException
Execute a Node

Throws:
ExecuteException - If an error occurs during execution, the exception is set with this Node so that a line number can be displayed along with the error message

executeXML

protected ASTXMLElement executeXML()
                            throws ExecuteException
Throws:
ExecuteException

hasArgument

public boolean hasArgument(int i)

getArgument

public DMNode getArgument(int i)
                   throws ExecuteException
Throws:
ExecuteException

executeArgument

public Value executeArgument(int i)
                      throws ExecuteException
Throws:
ExecuteException

executeArgumentNonNull

public Value executeArgumentNonNull(int i)
                             throws ExecuteException
Execute argument and ensure it returns a value

Throws:
ExecuteException

executeArgumentAsClass

public java.lang.Object executeArgumentAsClass(int i,
                                               java.lang.Class cl,
                                               boolean tryToCast)
                                        throws ExecuteException
Execute argument and ensure it is an instance of class cl

Parameters:
tryToCast - if true, try to convert the argument to class cl
Throws:
ExecuteException

executeArgumentTable

public TableResult executeArgumentTable(int i)
                                 throws ExecuteException
Throws:
ExecuteException

executeArgumentColumnHolder

public ColumnHolder executeArgumentColumnHolder(int i)
                                         throws ExecuteException
Throws:
ExecuteException

executeArgumentRecordHolder

public RecordHolder executeArgumentRecordHolder(int i)
                                         throws ExecuteException
Throws:
ExecuteException

getString

public java.lang.String getString()