org.openrdf.sail.rdbms.algebra.base
Class FromItem

java.lang.Object
  extended by org.openrdf.query.algebra.QueryModelNodeBase
      extended by org.openrdf.sail.rdbms.algebra.base.RdbmsQueryModelNodeBase
          extended by org.openrdf.sail.rdbms.algebra.base.FromItem
All Implemented Interfaces:
Cloneable, QueryModelNode
Direct Known Subclasses:
JoinItem, UnionItem

public abstract class FromItem
extends RdbmsQueryModelNodeBase

An item in the SQL from clause.

Author:
James Leigh

Constructor Summary
FromItem(String alias)
           
 
Method Summary
 void addFilter(SqlExpr filter)
           
 void addJoin(FromItem join)
           
 void addJoinBefore(FromItem valueJoin, FromItem join)
           
 List<ColumnVar> appendVars(List<ColumnVar> vars)
           
 FromItem clone()
          Returns a (deep) clone of this query model node.
 String getAlias()
           
 List<SqlExpr> getFilters()
           
 FromItem getFromItem(String alias)
           
 FromItem getFromItemNotInUnion(String alias)
           
 List<FromItem> getJoins()
           
 String getSignature()
          Default implementation of QueryModelNode.getSignature() that prints the name of the node's class.
 ColumnVar getVar(String name)
           
 ColumnVar getVarForChildren(String name)
           
 boolean isLeft()
           
protected  void joinAdded(FromItem valueJoin)
           
 void removeFilter(SqlExpr sqlExpr)
           
 void replaceChildNode(QueryModelNode current, QueryModelNode replacement)
          Default implementation of QueryModelNode.replaceChildNode(QueryModelNode, QueryModelNode) that throws an IllegalArgumentException indicating that current is not a child node of this node.
 void setLeft(boolean left)
           
<X extends Exception>
void
visitChildren(QueryModelVisitor<X> visitor)
          Dummy implementation of QueryModelNode.visitChildren(org.openrdf.query.algebra.QueryModelVisitor) that does nothing.
 
Methods inherited from class org.openrdf.sail.rdbms.algebra.base.RdbmsQueryModelNodeBase
visit, visit
 
Methods inherited from class org.openrdf.query.algebra.QueryModelNodeBase
getParentNode, replaceWith, setParentNode, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FromItem

public FromItem(String alias)
Method Detail

getAlias

public String getAlias()

isLeft

public boolean isLeft()

setLeft

public void setLeft(boolean left)

getFilters

public List<SqlExpr> getFilters()

addFilter

public void addFilter(SqlExpr filter)

getJoins

public List<FromItem> getJoins()

getVarForChildren

public ColumnVar getVarForChildren(String name)

getVar

public ColumnVar getVar(String name)

addJoin

public void addJoin(FromItem join)

addJoinBefore

public void addJoinBefore(FromItem valueJoin,
                          FromItem join)

joinAdded

protected void joinAdded(FromItem valueJoin)

getFromItem

public FromItem getFromItem(String alias)

getFromItemNotInUnion

public FromItem getFromItemNotInUnion(String alias)

removeFilter

public void removeFilter(SqlExpr sqlExpr)

appendVars

public List<ColumnVar> appendVars(List<ColumnVar> vars)

getSignature

public String getSignature()
Description copied from class: QueryModelNodeBase
Default implementation of QueryModelNode.getSignature() that prints the name of the node's class.

Specified by:
getSignature in interface QueryModelNode
Overrides:
getSignature in class QueryModelNodeBase
Returns:
The node's signature, e.g. SLICE (offset=10, limit=10).

clone

public FromItem clone()
Description copied from interface: QueryModelNode
Returns a (deep) clone of this query model node. This method recursively clones the entire node tree, starting from this nodes.

Specified by:
clone in interface QueryModelNode
Overrides:
clone in class QueryModelNodeBase
Returns:
A deep clone of this query model node.

visitChildren

public <X extends Exception> void visitChildren(QueryModelVisitor<X> visitor)
                   throws X extends Exception
Description copied from class: QueryModelNodeBase
Dummy implementation of QueryModelNode.visitChildren(org.openrdf.query.algebra.QueryModelVisitor) that does nothing. Subclasses should override this method when they have child nodes.

Specified by:
visitChildren in interface QueryModelNode
Overrides:
visitChildren in class QueryModelNodeBase
Throws:
X extends Exception

replaceChildNode

public void replaceChildNode(QueryModelNode current,
                             QueryModelNode replacement)
Description copied from class: QueryModelNodeBase
Default implementation of QueryModelNode.replaceChildNode(QueryModelNode, QueryModelNode) that throws an IllegalArgumentException indicating that current is not a child node of this node.

Specified by:
replaceChildNode in interface QueryModelNode
Overrides:
replaceChildNode in class QueryModelNodeBase
Parameters:
current - The current child node.
replacement - The new child node.


Copyright © 2001-2008 Aduna. All Rights Reserved.