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 voidacceptVisitor(LanguageVisitor visitor)Method for accepting a visitor.FromClausecloneDirect()Get deep clone of objectvoidcollectGroups(Collection groups)Collect all GroupSymbols for this from clause.booleanequals(Object obj)Check whether objects are equalCommandgetCommand()Get command held by clauseGroupSymbolgetGroupSymbol()Get GroupSymbol representing the named subqueryStringgetName()Get name of this clause.StringgetOutputName()inthashCode()Get hash code of objectbooleanisLateral()voidsetCommand(Command command)Set the command held by the clausevoidsetLateral(boolean table)voidsetName(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:
setCommandin interfaceSubqueryContainer- Parameters:
command- Command to hold
-
getCommand
public Command getCommand()
Get command held by clause- Specified by:
getCommandin 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:
collectGroupsin classFromClause- Parameters:
groups- Groups to add to
-
acceptVisitor
public void acceptVisitor(LanguageVisitor visitor)
Description copied from interface:LanguageObjectMethod for accepting a visitor. It is the responsibility of the language object to call back on the visitor.- Specified by:
acceptVisitorin interfaceLanguageObject- Specified by:
acceptVisitorin classFromClause- Parameters:
visitor- Visitor being used
-
equals
public boolean equals(Object obj)
Check whether objects are equal- Overrides:
equalsin 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:
cloneDirectin classFromClause- Returns:
- Deep copy of the object
-
-