Package org.teiid.query.sql.lang
Class DynamicCommand
- java.lang.Object
-
- org.teiid.query.sql.lang.Command
-
- org.teiid.query.sql.lang.DynamicCommand
-
- All Implemented Interfaces:
Cloneable
,LanguageObject
public class DynamicCommand extends Command
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.teiid.query.sql.LanguageObject
LanguageObject.Util
-
-
Field Summary
-
Fields inherited from class org.teiid.query.sql.lang.Command
tempGroupIDs, TYPE_ALTER_PROC, TYPE_ALTER_TRIGGER, TYPE_ALTER_VIEW, TYPE_BATCHED_UPDATE, TYPE_CREATE, TYPE_DELETE, TYPE_DROP, TYPE_DYNAMIC, TYPE_EXPLAIN, TYPE_INSERT, TYPE_QUERY, TYPE_SOURCE_EVENT, TYPE_STORED_PROCEDURE, TYPE_TRIGGER_ACTION, TYPE_UNKNOWN, TYPE_UPDATE, TYPE_UPDATE_PROCEDURE
-
-
Constructor Summary
Constructors Constructor Description DynamicCommand()
DynamicCommand(Expression sql, List columns, GroupSymbol intoGroup, SetClauseList using)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.boolean
areResultsCachable()
Whether the results are cachable.Object
clone()
Implement clone to make objects cloneable.boolean
equals(Object obj)
List
getAsColumns()
GroupSymbol
getIntoGroup()
List
getProjectedSymbols()
Get the ordered list of all elements returned by this query.List<? extends Expression>
getResultSetColumns()
Expression
getSql()
int
getType()
Return type of command to make it easier to build switch statements by command type.int
getUpdatingModelCount()
SetClauseList
getUsing()
int
hashCode()
boolean
isAsClauseSet()
boolean
returnsResultSet()
void
setAsClauseSet(boolean asClauseSet)
void
setAsColumns(List columns)
void
setIntoGroup(GroupSymbol intoGroup)
void
setSql(Expression sql)
void
setUpdatingModelCount(int count)
void
setUsing(SetClauseList using)
String
toString()
Returns a string representation of an instance of this class.-
Methods inherited from class org.teiid.query.sql.lang.Command
addExternalGroupToContext, copyMetadataState, getActualCommand, getAllExternalGroups, getCacheHint, getCommandToken, getCorrelatedReferences, getExternalGroupContexts, getOption, getProcessorPlan, getSourceHint, getTemporaryMetadata, getUpdateCommandSymbol, printCommandTree, printCommandTree, pushNewResolvingContext, sameOptionAndHint, setCacheHint, setCorrelatedReferences, setExternalGroupContexts, setOption, setProcessorPlan, setSourceHint, setTemporaryMetadata
-
-
-
-
Constructor Detail
-
DynamicCommand
public DynamicCommand()
-
DynamicCommand
public DynamicCommand(Expression sql, List columns, GroupSymbol intoGroup, SetClauseList using)
-
-
Method Detail
-
clone
public Object clone()
Description copied from interface:LanguageObject
Implement clone to make objects cloneable.- Specified by:
clone
in interfaceLanguageObject
- Specified by:
clone
in classCommand
- Returns:
- Deep clone of this object
- See Also:
Command.clone()
-
getType
public int getType()
Description copied from class:Command
Return type of command to make it easier to build switch statements by command type.- Specified by:
getType
in classCommand
- Returns:
- Type from TYPE constants
- See Also:
Command.getType()
-
getProjectedSymbols
public List getProjectedSymbols()
Description copied from class:Command
Get the ordered list of all elements returned by this query. These elements may be ElementSymbols or ExpressionSymbols but in all cases each represents a single column.- Specified by:
getProjectedSymbols
in classCommand
- Returns:
- Ordered list of SingleElementSymbol
- See Also:
Once past resolving, an EMPTY set of project columns indicates that the project columns of the actual command do not need to be checked during processing.
-
areResultsCachable
public boolean areResultsCachable()
Description copied from class:Command
Whether the results are cachable.- Specified by:
areResultsCachable
in classCommand
- Returns:
- True if the results are cachable; false otherwise.
- See Also:
Command.areResultsCachable()
-
setUpdatingModelCount
public void setUpdatingModelCount(int count)
-
getUpdatingModelCount
public int getUpdatingModelCount()
-
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.- Parameters:
visitor
- Visitor being used- See Also:
LanguageObject.acceptVisitor(org.teiid.query.sql.LanguageVisitor)
-
getAsColumns
public List getAsColumns()
- Returns:
- Returns the columns.
-
setAsColumns
public void setAsColumns(List columns)
- Parameters:
columns
- The columns to set.
-
getIntoGroup
public GroupSymbol getIntoGroup()
- Returns:
- Returns the intoGroup.
-
setIntoGroup
public void setIntoGroup(GroupSymbol intoGroup)
- Parameters:
intoGroup
- The intoGroup to set.
-
getSql
public Expression getSql()
- Returns:
- Returns the sql.
-
setSql
public void setSql(Expression sql)
- Parameters:
sql
- The sql to set.
-
getUsing
public SetClauseList getUsing()
- Returns:
- Returns the using.
-
setUsing
public void setUsing(SetClauseList using)
- Parameters:
using
- The using to set.
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classObject
- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classObject
- See Also:
Object.hashCode()
-
toString
public String toString()
Description copied from class:Command
Returns a string representation of an instance of this class.- Overrides:
toString
in classCommand
- Returns:
- String representation of object
- See Also:
Object.toString()
-
isAsClauseSet
public boolean isAsClauseSet()
- Returns:
- Returns the asClauseSet.
-
setAsClauseSet
public void setAsClauseSet(boolean asClauseSet)
- Parameters:
asClauseSet
- The asClauseSet to set.
-
returnsResultSet
public boolean returnsResultSet()
- Overrides:
returnsResultSet
in classCommand
-
getResultSetColumns
public List<? extends Expression> getResultSetColumns()
- Overrides:
getResultSetColumns
in classCommand
- Returns:
- null if unknown, empty if results are not returned, or the resultset columns
-
-