com.metamatrix.query.sql.lang
Class BatchedUpdateCommand

java.lang.Object
  extended by com.metamatrix.query.sql.lang.Command
      extended by com.metamatrix.query.sql.lang.BatchedUpdateCommand
All Implemented Interfaces:
CommandContainer, LanguageObject, java.io.Serializable, java.lang.Cloneable

public class BatchedUpdateCommand
extends Command
implements CommandContainer

Represents a batch of INSERT, UPDATE, DELETE, and SELECT INTO commands

Since:
4.2
See Also:
Serialized Form

Field Summary
protected  java.util.List commands
           
 
Fields inherited from class com.metamatrix.query.sql.lang.Command
tempGroupIDs, TYPE_BATCHED_UPDATE, TYPE_CREATE, TYPE_DELETE, TYPE_DROP, TYPE_DYNAMIC, TYPE_INSERT, TYPE_QUERY, TYPE_SQL, TYPE_STORED_PROCEDURE, TYPE_UNKNOWN, TYPE_UPDATE, TYPE_UPDATE_PROCEDURE, TYPE_XQUERY
 
Constructor Summary
BatchedUpdateCommand(java.util.List updateCommands)
           
 
Method Summary
 void acceptVisitor(LanguageVisitor visitor)
          Method for accepting a visitor.
 void addSubCommand(Command command)
          Add sub command
 void addSubCommands(java.util.Collection commands)
          Add sub commands
 boolean areResultsCachable()
          Whether the results are cachable.
 java.lang.Object clone()
          Implement clone to make objects cloneable.
 java.util.List getContainedCommands()
           
 java.util.List getProjectedSymbols()
          Get the ordered list of all elements returned by this query.
 java.util.List getSubCommands()
          Gets the subCommands (both embedded and non-embedded) under this command.
 int getType()
          Return type of command to make it easier to build switch statements by command type.
 java.util.List getUpdateCommands()
          Gets the List of updates contained in this batch
 java.lang.String toString()
          Returns a string representation of an instance of this class.
 int updatingModelCount(QueryMetadataInterface metadata)
          Return the number of updates on physical sources by this command.
 
Methods inherited from class com.metamatrix.query.sql.lang.Command
addExternalGroupsToContext, addExternalGroupToContext, copyMetadataState, getAllExternalGroups, getCorrelatedReferences, getExternalGroupContexts, getOption, getProcessorPlan, getSubCommandsUpdatingModelCount, getSubCommandsUpdatingModelCount, getTemporaryMetadata, getUpdateCommandSymbol, getVirtualGroup, isResolved, printCommandTree, printCommandTree, pushNewResolvingContext, setCorrelatedReferences, setExternalGroupContexts, setIsResolved, setOption, setProcessorPlan, setTemporaryMetadata, setVirtualGroup
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

commands

protected java.util.List commands
Constructor Detail

BatchedUpdateCommand

public BatchedUpdateCommand(java.util.List updateCommands)
Parameters:
updateCommands -
Since:
4.2
Method Detail

addSubCommand

public void addSubCommand(Command command)
Add sub command

Parameters:
command - Additional sub-command

addSubCommands

public void addSubCommands(java.util.Collection commands)
Add sub commands

Parameters:
commands - Additional sub-commands

getSubCommands

public java.util.List getSubCommands()
Description copied from class: Command
Gets the subCommands (both embedded and non-embedded) under this command. In general the returned list is not safe to manipulate (see @link#CommandContainer insead)

Overrides:
getSubCommands in class Command
Returns:
See Also:
Command.getSubCommands()

getUpdateCommands

public java.util.List 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 class Command
Returns:
Type from TYPE constants
Since:
4.2
See Also:
Command.getType()

getProjectedSymbols

public java.util.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 class Command
Returns:
Ordered list of SingleElementSymbol
Since:
4.2
See Also:
Command.getProjectedSymbols()

updatingModelCount

public int updatingModelCount(QueryMetadataInterface metadata)
                       throws MetaMatrixComponentException
Description copied from class: Command
Return the number of updates on physical sources by this command.

Specified by:
updatingModelCount in class Command
Parameters:
metadata - QueryMetadataInterface
Returns:
The number of updates on physical sources by this command.
Throws:
MetaMatrixComponentException

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 interface LanguageObject
Parameters:
visitor - Visitor being used
Since:
4.2

clone

public java.lang.Object clone()
Description copied from interface: LanguageObject
Implement clone to make objects cloneable.

Specified by:
clone in interface LanguageObject
Specified by:
clone in class Command
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 class Command
Returns:
True if the results are cachable; false otherwise.
See Also:
Command.areResultsCachable()

toString

public java.lang.String toString()
Description copied from class: Command
Returns a string representation of an instance of this class.

Overrides:
toString in class Command
Returns:
String representation of object

getContainedCommands

public java.util.List getContainedCommands()
Specified by:
getContainedCommands in interface CommandContainer
See Also:
CommandContainer.getContainedCommands()


Copyright © 2009. All Rights Reserved.