public class Update extends ProcedureContainer implements FilteredCommand
LanguageObject.UtiltempGroupIDs, 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, setUpdateInfoaddExternalGroupToContext, copyMetadataState, getAllExternalGroups, getCacheHint, getCommandToken, getCorrelatedReferences, getExternalGroupContexts, getOption, getProcessorPlan, getResultSetColumns, getSourceHint, getTemporaryMetadata, getUpdateCommandSymbol, printCommandTree, printCommandTree, pushNewResolvingContext, returnsResultSet, sameOptionAndHint, setCacheHint, setCorrelatedReferences, setExternalGroupContexts, setOption, setProcessorPlan, setSourceHint, setTemporaryMetadatapublic Update()
public Update(GroupSymbol group, SetClauseList changeList)
group - Group to by updatedchangeList - List of CompareCriteria that represent Element and expression updatespublic Update(GroupSymbol group, SetClauseList changeList, Criteria criteria)
group - DataGroupID that represents the group being updatedchangeList - of changeCriteria that represent Element and value pairingscriteria - Criteria that defines what rows get updatedpublic int getType()
public GroupSymbol getGroup()
getGroup in interface TargetedCommandpublic 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 FilteredCommandpublic void setCriteria(Criteria criteria)
setCriteria in interface FilteredCommandcriteria - Criteria to be associated with this commandpublic void acceptVisitor(LanguageVisitor visitor)
LanguageObjectacceptVisitor in interface LanguageObjectvisitor - Visitor being usedpublic int hashCode()
public String toString()
public boolean equals(Object obj)
public Object clone()
clone in interface LanguageObjectclone in class Commandpublic List getProjectedSymbols()
getProjectedSymbols in class Commandpublic boolean areResultsCachable()
CommandareResultsCachable in class CommandCommand.areResultsCachable()public Criteria getConstraint()
public void setConstraint(Criteria constraint)
Copyright © 2019. All rights reserved.