com.metamatrix.query.sql.lang
Class DynamicCommand

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

public class DynamicCommand
extends Command

See Also:
Serialized Form

Field Summary
 
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
DynamicCommand()
           
DynamicCommand(Expression sql, java.util.List columns, GroupSymbol intoGroup, SetClauseList using)
           
 
Method Summary
 void acceptVisitor(LanguageVisitor visitor)
          Method for accepting a visitor.
 boolean areResultsCachable()
          Whether the results are cachable.
 java.lang.Object clone()
          Implement clone to make objects cloneable.
 boolean equals(java.lang.Object obj)
           
 java.util.List getAsColumns()
           
 GroupSymbol getIntoGroup()
           
 java.util.List getProjectedSymbols()
          Get the ordered list of all elements returned by this query.
 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()
           
 void setAsClauseSet(boolean asClauseSet)
           
 void setAsColumns(java.util.List columns)
           
 void setIntoGroup(GroupSymbol intoGroup)
           
 void setSql(Expression sql)
           
 void setUpdatingModelCount(int count)
           
 void setUsing(SetClauseList using)
           
 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, getSubCommands, getSubCommandsUpdatingModelCount, getSubCommandsUpdatingModelCount, getTemporaryMetadata, getUpdateCommandSymbol, getVirtualGroup, isResolved, printCommandTree, printCommandTree, pushNewResolvingContext, setCorrelatedReferences, setExternalGroupContexts, setIsResolved, setOption, setProcessorPlan, setTemporaryMetadata, setVirtualGroup
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DynamicCommand

public DynamicCommand()

DynamicCommand

public DynamicCommand(Expression sql,
                      java.util.List columns,
                      GroupSymbol intoGroup,
                      SetClauseList using)
Method Detail

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
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 class Command
Returns:
Type from TYPE constants
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
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 class Command
Returns:
True if the results are cachable; false otherwise.
See Also:
Command.areResultsCachable()

setUpdatingModelCount

public void setUpdatingModelCount(int count)

getUpdatingModelCount

public int getUpdatingModelCount()

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
See Also:
Command.updatingModelCount(com.metamatrix.query.metadata.QueryMetadataInterface)

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(com.metamatrix.query.sql.LanguageVisitor)

getAsColumns

public java.util.List getAsColumns()
Returns:
Returns the columns.

setAsColumns

public void setAsColumns(java.util.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(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

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
See Also:
Object.toString()

isAsClauseSet

public boolean isAsClauseSet()
Returns:
Returns the asClauseSet.

setAsClauseSet

public void setAsClauseSet(boolean asClauseSet)
Parameters:
asClauseSet - The asClauseSet to set.


Copyright © 2009. All Rights Reserved.