Package org.teiid.query.sql.lang
Class BatchedUpdateCommand
- java.lang.Object
-
- org.teiid.query.sql.lang.Command
-
- org.teiid.query.sql.lang.BatchedUpdateCommand
-
- All Implemented Interfaces:
Cloneable
,LanguageObject
public class BatchedUpdateCommand extends Command
Represents a batch of INSERT, UPDATE, DELETE, and SELECT INTO commands- Since:
- 4.2
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.teiid.query.sql.LanguageObject
LanguageObject.Util
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Command>
commands
-
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 BatchedUpdateCommand(List<? extends Command> updateCommands)
BatchedUpdateCommand(List<? extends Command> updateCommands, boolean singleResult)
-
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
getProjectedSymbols()
Get the ordered list of all elements returned by this query.String
getStringForm(boolean full)
int
getType()
Return type of command to make it easier to build switch statements by command type.List<Command>
getUpdateCommands()
Gets the List of updates contained in this batchList<VariableContext>
getVariableContexts()
int
hashCode()
boolean
isSingleResult()
void
setSingleResult(boolean singleResult)
void
setVariableContexts(List<VariableContext> variableContexts)
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, getResultSetColumns, getSourceHint, getTemporaryMetadata, getUpdateCommandSymbol, printCommandTree, printCommandTree, pushNewResolvingContext, returnsResultSet, sameOptionAndHint, setCacheHint, setCorrelatedReferences, setExternalGroupContexts, setOption, setProcessorPlan, setSourceHint, setTemporaryMetadata
-
-
-
-
Method Detail
-
getUpdateCommands
public List<Command> getUpdateCommands()
Gets the List of updates contained in this batch- Returns:
- Since:
- 4.2
-
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
- Since:
- 4.2
- 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
- Since:
- 4.2
- See Also:
Command.getProjectedSymbols()
-
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- Since:
- 4.2
-
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
- Since:
- 4.2
- See Also:
Object.clone()
-
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()
-
toString
public String toString()
Description copied from class:Command
Returns a string representation of an instance of this class.
-
setVariableContexts
public void setVariableContexts(List<VariableContext> variableContexts)
-
getVariableContexts
public List<VariableContext> getVariableContexts()
-
setSingleResult
public void setSingleResult(boolean singleResult)
-
isSingleResult
public boolean isSingleResult()
-
getStringForm
public String getStringForm(boolean full)
-
-