public class Update extends ProcedureContainer implements FilteredCommand
LanguageObject.Util
tempGroupIDs, TYPE_ALTER_PROC, TYPE_ALTER_TRIGGER, TYPE_ALTER_VIEW, TYPE_BATCHED_UPDATE, TYPE_CREATE, TYPE_DELETE, TYPE_DROP, TYPE_DYNAMIC, TYPE_INSERT, TYPE_QUERY, TYPE_SOURCE_EVENT, TYPE_STORED_PROCEDURE, TYPE_TRIGGER_ACTION, TYPE_UNKNOWN, TYPE_UPDATE, TYPE_UPDATE_PROCEDURE
Constructor and Description |
---|
Update()
Constructs a default instance of this class.
|
Update(GroupSymbol group,
SetClauseList changeList)
Construct with group and change list
|
Update(GroupSymbol group,
SetClauseList changeList,
Criteria criteria)
Construct with group, change list, and criteria
|
Modifier and Type | Method and Description |
---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.
|
void |
addChange(ElementSymbol id,
Expression value)
Add change to change list - a change is represented by a CompareCriteria
internally but can be added here as an element and an expression
|
boolean |
areResultsCachable()
Whether the results are cachable.
|
Object |
clone()
Return a copy of this Update.
|
boolean |
equals(Object obj)
Compare two update commands for equality.
|
SetClauseList |
getChangeList()
Return the list of CompareCriteria representing updates being made
|
Criteria |
getConstraint() |
Criteria |
getCriteria()
Returns the criteria object for this command, may be null
|
GroupSymbol |
getGroup()
Returns the group being updated
|
List |
getProjectedSymbols()
Get the ordered list of all elements returned by this query.
|
int |
getType()
Return type of command.
|
int |
hashCode()
Get hashcode for command.
|
void |
setChangeList(SetClauseList changeList)
Set the list of CompareCriteria representing updates being made
|
void |
setConstraint(Criteria constraint) |
void |
setCriteria(Criteria criteria)
Set the criteria for this Update command
|
void |
setGroup(GroupSymbol group)
Set the group being updated
|
String |
toString()
Returns a string representation of an instance of this class.
|
addTag, copyMetadataState, getUpdateCount, getUpdateInfo, hasTag, setUpdateCount, setUpdateInfo
addExternalGroupToContext, copyMetadataState, getAllExternalGroups, getCacheHint, getCommandToken, getCorrelatedReferences, getExternalGroupContexts, getOption, getProcessorPlan, getResultSetColumns, getSourceHint, getTemporaryMetadata, getUpdateCommandSymbol, printCommandTree, printCommandTree, pushNewResolvingContext, returnsResultSet, sameOptionAndHint, setCacheHint, setCorrelatedReferences, setExternalGroupContexts, setOption, setProcessorPlan, setSourceHint, setTemporaryMetadata
public Update()
public Update(GroupSymbol group, SetClauseList changeList)
group
- Group to by updatedchangeList
- List of CompareCriteria that represent Element->expression updatespublic Update(GroupSymbol group, SetClauseList changeList, Criteria criteria)
group
- DataGroupID that represents the group being updatedList
- of changeCriteria that represent Element->value pairingscriteria
- Criteria that defines what rows get updatedpublic int getType()
public GroupSymbol getGroup()
getGroup
in interface TargetedCommand
public void setGroup(GroupSymbol group)
group
- Group being updatedpublic void setChangeList(SetClauseList changeList)
changeList
- List of CompareCriteriapublic SetClauseList getChangeList()
public void addChange(ElementSymbol id, Expression value)
id
- Element to be changedvalue
- Expression, often a value, being setpublic Criteria getCriteria()
getCriteria
in interface FilteredCommand
public void setCriteria(Criteria criteria)
setCriteria
in interface FilteredCommand
criteria
- Criteria to be associated with this commandpublic void acceptVisitor(LanguageVisitor visitor)
LanguageObject
acceptVisitor
in interface LanguageObject
visitor
- Visitor being usedpublic int hashCode()
public String toString()
public boolean equals(Object obj)
public Object clone()
clone
in interface LanguageObject
clone
in class Command
public List getProjectedSymbols()
getProjectedSymbols
in class Command
public boolean areResultsCachable()
Command
areResultsCachable
in class Command
Command.areResultsCachable()
public Criteria getConstraint()
public void setConstraint(Criteria constraint)
Copyright © 2019. All rights reserved.