com.metamatrix.query.sql.lang
Class Delete
java.lang.Object
com.metamatrix.query.sql.lang.Command
com.metamatrix.query.sql.lang.ProcedureContainer
com.metamatrix.query.sql.lang.Delete
- All Implemented Interfaces:
- CommandContainer, LanguageObject, java.io.Serializable, java.lang.Cloneable
public class Delete
- extends ProcedureContainer
This class represents a SQL Delete statement of the form:
"DELETE FROM [WHERE ]".
Implements Command interface.
- See Also:
- Serialized Form
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 |
Delete()
Constructs a default instance of this class. |
Delete(GroupSymbol group)
Constructs an instance of this class given the group. |
Delete(GroupSymbol group,
Criteria criteria)
Constructs an instance of this class given the group and criteria. |
Methods inherited from class com.metamatrix.query.sql.lang.Command |
addExternalGroupsToContext, addExternalGroupToContext, 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 |
Delete
public Delete()
- Constructs a default instance of this class.
Delete
public Delete(GroupSymbol group)
- Constructs an instance of this class given the group.
- Parameters:
group
- Identifier of the group to delete data from.
Delete
public Delete(GroupSymbol group,
Criteria criteria)
- Constructs an instance of this class given the group and criteria.
- Parameters:
group
- Identifier of the group to delete data from.criteria
- The criteria specifying constraints on what data will be deleted.
getType
public int getType()
- Return type of command.
- Specified by:
getType
in class Command
- Returns:
Command.TYPE_DELETE
getGroup
public GroupSymbol getGroup()
- Returns the group being deleted from
- Specified by:
getGroup
in class ProcedureContainer
- Returns:
- Group symbol
setGroup
public void setGroup(GroupSymbol group)
- Set the group for this Delete command
- Parameters:
group
- Group to be associated with this command
getCriteria
public Criteria getCriteria()
- Returns the criteria object for this command.
- Returns:
- criteria
setCriteria
public void setCriteria(Criteria criteria)
- Set the criteria for this Delete command
- Parameters:
criteria
- Criteria to be associated with this command
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
hashCode
public int hashCode()
- Get hashcode for command. WARNING: This hash code relies on the hash codes of the
Group and Criteria clause. If the command changes, it's hash code will change and
it can be lost from collections. Hash code is only valid after the command has been
completely constructed.
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Returns a string representation of an instance of this class.
- Overrides:
toString
in class Command
- Returns:
- Command in string form
equals
public boolean equals(java.lang.Object obj)
- Compare two commands for equality. Will only evaluate to equal if
they are IDENTICAL: group is the same, criteria are in
the same exact structure.
- Overrides:
equals
in class java.lang.Object
getProcedureParameters
public java.util.Map getProcedureParameters()
- Specified by:
getProcedureParameters
in class ProcedureContainer
- Since:
- 5.0
- See Also:
com.metamatrix.query.sql.lang.ProcedureContainer#getParameters()
clone
public java.lang.Object clone()
- Return a copy of this Delete.
- Specified by:
clone
in interface LanguageObject
- Specified by:
clone
in class Command
- Returns:
- Deep clone of this object
getProjectedSymbols
public java.util.List getProjectedSymbols()
- 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
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()
Copyright © 2009. All Rights Reserved.