org.openrdf.sail.rdbms.algebra
Class SelectQuery
java.lang.Object
org.openrdf.query.algebra.QueryModelNodeBase
org.openrdf.sail.rdbms.algebra.base.RdbmsQueryModelNodeBase
org.openrdf.sail.rdbms.algebra.SelectQuery
- All Implemented Interfaces:
- Cloneable, QueryModelNode, TupleExpr
public class SelectQuery
- extends RdbmsQueryModelNodeBase
- implements TupleExpr
An SQL query.
- Author:
- James Leigh
SelectQuery
public SelectQuery()
isDistinct
public boolean isDistinct()
setDistinct
public void setDistinct(boolean b)
isComplex
public boolean isComplex()
getFrom
public FromItem getFrom()
setFrom
public void setFrom(FromItem from)
getOrderElems
public List<SelectQuery.OrderElem> getOrderElems()
addOrder
public void addOrder(SqlExpr order,
boolean isAscending)
getOffset
public Integer getOffset()
setOffset
public void setOffset(Integer offset)
getLimit
public Integer getLimit()
setLimit
public void setLimit(Integer limit)
getBindingName
public String getBindingName(ColumnVar var)
getBindingNames
public Set<String> getBindingNames()
- Description copied from interface:
TupleExpr
- Gets the names of the bindings that are, or can be, returned by this tuple
expression when it is evaluated.
- Specified by:
getBindingNames in interface TupleExpr
- Returns:
- A set of binding names.
setBindingNames
public void setBindingNames(Map<String,String> bindingNames)
getSqlSelectVar
public Collection<SelectProjection> getSqlSelectVar()
setSqlSelectVar
public void setSqlSelectVar(Collection<SelectProjection> projections)
getSelectProjection
public SelectProjection getSelectProjection(String name)
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.
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
clone
public SelectQuery 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- Specified by:
clone in interface TupleExpr- Overrides:
clone in class QueryModelNodeBase
- Returns:
- A deep clone of this query model node.
visit
public <X extends Exception> void visit(RdbmsQueryModelVisitorBase<X> visitor)
throws X extends Exception
- Specified by:
visit in class RdbmsQueryModelNodeBase
- Throws:
X extends Exception
hasSqlSelectVar
public boolean hasSqlSelectVar(SelectProjection node)
addSqlSelectVar
public void addSqlSelectVar(SelectProjection node)
getProjections
public Collection<ColumnVar> getProjections()
getVars
public Collection<ColumnVar> getVars()
getVar
public ColumnVar getVar(String varName)
addFilter
public void addFilter(SqlExpr sql)
addJoin
public void addJoin(SelectQuery right)
addLeftJoin
public void addLeftJoin(SelectQuery right)
getFromItem
public FromItem getFromItem(String alias)
getFilters
public List<SqlExpr> getFilters()
removeFilter
public void removeFilter(SqlExpr sqlExpr)
getVarMap
public Map<String,ColumnVar> getVarMap()
Copyright © 2001-2008 Aduna. All Rights Reserved.