Package org.teiid.query.sql.lang
Class SubqueryFromClause
- java.lang.Object
-
- org.teiid.query.sql.lang.FromClause
-
- org.teiid.query.sql.lang.SubqueryFromClause
-
- All Implemented Interfaces:
Cloneable
,SubqueryContainer
,LanguageObject
public class SubqueryFromClause extends FromClause implements SubqueryContainer
A FROM subpart that represents a subquery. For example, the FROM clause: "FROM (SELECT a FROM b)" will have a SubqueryFromClause referencing the subquery.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.teiid.query.sql.LanguageObject
LanguageObject.Util
-
Nested classes/interfaces inherited from interface org.teiid.query.sql.lang.SubqueryContainer
SubqueryContainer.Evaluatable<T extends Command>
-
-
Field Summary
-
Fields inherited from class org.teiid.query.sql.lang.FromClause
PRESERVE
-
-
Constructor Summary
Constructors Constructor Description SubqueryFromClause(String name)
Construct default objectSubqueryFromClause(String name, Command command)
Construct object with specified command and nameSubqueryFromClause(GroupSymbol symbol, Command command)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.FromClause
cloneDirect()
Get deep clone of objectvoid
collectGroups(Collection groups)
Collect all GroupSymbols for this from clause.boolean
equals(Object obj)
Check whether objects are equalCommand
getCommand()
Get command held by clauseGroupSymbol
getGroupSymbol()
Get GroupSymbol representing the named subqueryString
getName()
Get name of this clause.String
getOutputName()
int
hashCode()
Get hash code of objectboolean
isLateral()
void
setCommand(Command command)
Set the command held by the clausevoid
setLateral(boolean table)
void
setName(String name)
Reset the alias for this subquery from clause and it's pseudo-GroupSymbol.-
Methods inherited from class org.teiid.query.sql.lang.FromClause
clone, getMakeDep, getMakeInd, hasHint, isMakeDep, isMakeNotDep, isNoUnnest, isOptional, isPreserve, setMakeDep, setMakeDep, setMakeInd, setMakeNotDep, setNoUnnest, setOptional, setPreserve, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.teiid.query.sql.LanguageObject
clone
-
-
-
-
Constructor Detail
-
SubqueryFromClause
public SubqueryFromClause(String name)
Construct default object
-
SubqueryFromClause
public SubqueryFromClause(String name, Command command)
Construct object with specified command and name- Parameters:
command
- Command representing subquery, or stored procedurename
- Alias of the subquery
-
SubqueryFromClause
public SubqueryFromClause(GroupSymbol symbol, Command command)
-
-
Method Detail
-
isLateral
public boolean isLateral()
-
setLateral
public void setLateral(boolean table)
-
setName
public void setName(String name)
Reset the alias for this subquery from clause and it's pseudo-GroupSymbol. WARNING: this will modify the hashCode and equals semantics and will cause this object to be lost if currently in a HashMap or HashSet.- Parameters:
name
- New name- Since:
- 4.3
-
setCommand
public void setCommand(Command command)
Set the command held by the clause- Specified by:
setCommand
in interfaceSubqueryContainer
- Parameters:
command
- Command to hold
-
getCommand
public Command getCommand()
Get command held by clause- Specified by:
getCommand
in interfaceSubqueryContainer
- Returns:
- Command held by clause
-
getName
public String getName()
Get name of this clause.- Returns:
- Name of clause
-
getOutputName
public String getOutputName()
-
getGroupSymbol
public GroupSymbol getGroupSymbol()
Get GroupSymbol representing the named subquery- Returns:
- GroupSymbol representing the subquery
-
collectGroups
public void collectGroups(Collection groups)
Collect all GroupSymbols for this from clause.- Specified by:
collectGroups
in classFromClause
- Parameters:
groups
- Groups to add to
-
acceptVisitor
public void acceptVisitor(LanguageVisitor visitor)
Description copied from interface:LanguageObject
Method for accepting a visitor. It is the responsibility of the language object to call back on the visitor.- Specified by:
acceptVisitor
in interfaceLanguageObject
- Specified by:
acceptVisitor
in classFromClause
- Parameters:
visitor
- Visitor being used
-
equals
public boolean equals(Object obj)
Check whether objects are equal- Overrides:
equals
in classFromClause
- Parameters:
obj
- Other object- Returns:
- True if equal
-
hashCode
public int hashCode()
Get hash code of object
-
cloneDirect
public FromClause cloneDirect()
Get deep clone of object- Specified by:
cloneDirect
in classFromClause
- Returns:
- Deep copy of the object
-
-