unity.query
Class LQNode

java.lang.Object
  extended by unity.query.LQNode
All Implemented Interfaces:
LQTreeConstants
Direct Known Subclasses:
LQCondNode, LQDupElimNode, LQExprNode, LQGroupByNode, LQJoinNode, LQOrderByNode, LQProductNode, LQProjNode, LQSelNode, LQUnionNode

public abstract class LQNode
extends java.lang.Object
implements LQTreeConstants


Field Summary
 
Fields inherited from interface unity.query.LQTreeConstants
ADD, AGGREGATEFUNCTION, AND, APPEND, ARITH_OP, ARITHMETICFUNCTION, AS_IDENTIFIER, AS_TABLE, BAG_DIFFERENCE, BAG_INTERSECTION, BAG_UNION, BigDecimal, COMPARISON_OP, CONDITION, CONSTANTEXPRESSION, CROSSPRODUCT, DIFFERENCE, DISTRIBUTEDJOIN, DUPLICATE_ELIMINATION, DYNAMICHASHJOIN, EARLYHASHJOIN, EARLYHASHJOIN_NOBUFFER, EXPRESSION, FILTER, FULLOUTERJOIN, FUNCTION, GROUPBY, HAVING, IDENTIFIER, IN, INNERJOIN, INTEGER, INTERSECTION, JOIN, LEFTOUTERJOIN, MATCHFUNCTION, MERGE, MERGEJOIN, MINIMUM_JOIN_BUFFER_SIZE, MULT, MULT_OP, NESTEDLOOPJOIN, NOT, OR, ORDERBY, PRODUCT, PROJECTION, REAL, RIGHTOUTERJOIN, SELECTION, SQLPATTERN, STRING, TABLE, TABLE_IDENTIFIER, UNION, UNKNOWN, XOR
 
Constructor Summary
LQNode()
           
LQNode(LQNode n)
           
 
Method Summary
 void addChild(LQNode child)
           
abstract  Operator buildOperator(Operator[] children)
           
 java.lang.Object clone()
           
 boolean containsChild(LQNode child)
           
abstract  java.lang.String generateSQL()
           
static java.util.ArrayList getAllExprNodes(LQNode node)
           
 LQNode getChild()
           
 LQNode getChild(int index)
           
 java.util.ArrayList getChildren()
           
 java.lang.Object getContent()
           
 int getNumChildren()
           
 Operator getOperator()
           
 Relation getOutputRelation()
           
 LQNode getParent()
           
 java.lang.Object getReference()
           
 java.util.ArrayList getRequiredFields()
           
 int getType()
           
 boolean hasChildren()
           
 int indexOfChild(LQNode child)
           
 int numTuples()
           
 void print(int k)
           
 void removeChild()
           
 void removeChild(int index)
           
 void removeChild(LQNode n)
           
 void replaceChild(LQNode oldChild, LQNode newChild)
           
 void setChild(int idx, LQNode newChild)
           
 void setContent(java.lang.Object content)
           
 void setMemorySizeTuples(long l)
           
 void setOperator(Operator o)
           
 void setParent(LQNode parent)
           
 void setReference(java.lang.Object ref)
           
 void setType(int t)
           
 java.lang.String stripDBAttr(java.lang.String attribute)
           
 java.lang.String stripDBTable(java.lang.String table)
           
 int tupleSize()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LQNode

public LQNode()

LQNode

public LQNode(LQNode n)
Method Detail

setOperator

public void setOperator(Operator o)

getOperator

public Operator getOperator()

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

setMemorySizeTuples

public void setMemorySizeTuples(long l)

setType

public void setType(int t)

getType

public int getType()

getParent

public LQNode getParent()

setParent

public void setParent(LQNode parent)

hasChildren

public boolean hasChildren()

getNumChildren

public int getNumChildren()

getChild

public LQNode getChild(int index)

getChild

public LQNode getChild()

getChildren

public java.util.ArrayList getChildren()

indexOfChild

public int indexOfChild(LQNode child)

containsChild

public boolean containsChild(LQNode child)

addChild

public void addChild(LQNode child)

removeChild

public void removeChild(int index)

removeChild

public void removeChild(LQNode n)

removeChild

public void removeChild()

getContent

public java.lang.Object getContent()

setContent

public void setContent(java.lang.Object content)

getReference

public java.lang.Object getReference()

setReference

public void setReference(java.lang.Object ref)

replaceChild

public void replaceChild(LQNode oldChild,
                         LQNode newChild)

setChild

public void setChild(int idx,
                     LQNode newChild)

getRequiredFields

public java.util.ArrayList getRequiredFields()

numTuples

public int numTuples()

tupleSize

public int tupleSize()

getOutputRelation

public Relation getOutputRelation()

stripDBAttr

public java.lang.String stripDBAttr(java.lang.String attribute)

stripDBTable

public java.lang.String stripDBTable(java.lang.String table)

generateSQL

public abstract java.lang.String generateSQL()

buildOperator

public abstract Operator buildOperator(Operator[] children)
                                throws java.sql.SQLException
Throws:
java.sql.SQLException

print

public void print(int k)

getAllExprNodes

public static java.util.ArrayList getAllExprNodes(LQNode node)