UPDATE clause of the UPDATE statement.
An UPDATE statement provides bulk operations over sets of entities of a
single entity class (together with its subclasses, if any). Only one entity abstract schema type
may be specified in the UPDATE clause.
BNF: update_clause ::= UPDATE abstract_schema_name [[AS] identification_variable] SET update_item {, update_item}*
UpdateClause
| Modifier and Type | Field and Description |
|---|---|
| private List | items
The list of |
| public static final String | UPDATE_ITEMS_LIST
Notify the list of |
| Access | Constructor and Description |
|---|---|
| public | UpdateClauseStateObject(UpdateStatementStateObject
The parent of this state object, which cannot be parent)nullCreates a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(StateObjectVisitor
The visitor)visitor to visit this objectImplements org. StateObject by the given visitor.
|
| protected void | addChildren(List<StateObject>
The list used to store the children children)Overrides org. StateObject to the given list.
|
| public UpdateItemStateObject | |
| public UpdateItemStateObject | Returns: The newly addedUpdateItemStateObjectThe paths of the value to update paths, StateObject The newValue)StateObject representing the new valueAdds a new |
| public UpdateItemStateObject | Returns: The newly addedUpdateItemStateObjectThe paths of the value to update paths, String The string representation of the new value to parse and to convert into a
newValue)StateObject representationAdds a new |
| public UpdateItemStateObject | Returns: The newly addedUpdateItemStateObjectThe path of the value to update path)Implements org. UPDATE item to this clause.
|
| public UpdateItemStateObject | Returns: The newly addedUpdateItemStateObjectThe path of the value to update path, StateObject The newValue)StateObject representing the new valueAdds a new |
| public UpdateItemStateObject | Returns: The newly addedUpdateItemStateObjectThe path of the value to update path, String The string representation of the new value to parse and to convert into a
newValue)StateObject representationAdds a new |
| public UpdateItemStateObject | Returns: The newly addedUpdateItemStateObjectThe paths of the value to update paths, StateObject The newValue)StateObject representing the new valueAdds a new |
| public UpdateItemStateObject | Returns: The newly addedUpdateItemStateObjectThe paths of the value to update paths, String The string representation of the new value to parse and to convert into a
newValue)StateObject representationAdds a new |
| public <S extends UpdateItemStateObject> S | addItem(S
The child item)StateObject to become a child of this one
return The given itemImplements org. StateObject as a child of this one.
|
| public void | addItems(List<? extends UpdateItemStateObject>
The items)StateObjects to become children of this oneImplements org. StateObjects as children of this one.
|
| public void | addListChangeListener(String
The name of the list for which the listener will be notified when the content
of the list has changed listName, IListChangeListener<UpdateItemStateObject> The listener to be notified upon changes listener)Implements org. IListChangeListener for the specified list.
|
| protected boolean | Returns: true if both have equivalent children; false otherwiseThe stateObject)StateObject to compare its children to this one's childrenDetermines whether the children of this |
| public boolean | canMoveDown(UpdateItemStateObject
The item)StateObject that could potentially be moved downImplements org. StateObject can be moved down by one position in the
list owned by its parent.
|
| public boolean | canMoveUp(UpdateItemStateObject
The item)StateObject that could potentially be moved upImplements org. StateObject can be moved up by one position in the list
owned by its parent.
|
| public UpdateClause | getExpression()
Overrides org. Implements org. StateObject representation of the JPQL query
was created by parsing an existing JPQL query.
|
| public String | getIdentifier()
Implements abstract org. |
| public UpdateItemStateObject | getItem(int
The position of the index)StateObject to retrieveImplements org. StateObject at the given positions from the list
|
| public UpdateStatementStateObject | getParent()
Overrides org. Implements org. StateObject.
|
| public boolean | hasItems()
Implements org. StateObject has any children.
|
| protected void | initialize()
Overrides org. |
| public boolean | isEquivalent(StateObject
The stateObject)StateObject to compare its content to this oneOverrides org. Implements org. StateObject is equivalent to this one, i.e. the
information of both StateObject is the same.
|
| public boolean | Returns: true if the identification variable has been specified; false
otherwise, which means it has been generated based on the abstract schema nameDetermines whether the identification variable has been defined. |
| public ListIterable | items()
Implements org. ListIterable over the children.
|
| public int | itemsSize()
Implements org. |
| public UpdateItemStateObject | moveDown(UpdateItemStateObject
The item)StateObject to move down in the listImplements org. StateObject down by one position in the list owned by its parent.
|
| public UpdateItemStateObject | moveUp(UpdateItemStateObject
The item)StateObject to move up in the listImplements org. StateObject up by one position in the list owned by its parent.
|
| public void | parse(String
The portion of the query representing a single update item jpqlFragment)Parses the given fragment, which represents a single update item, and creates the |
| public void | removeItem(UpdateItemStateObject
The child stateObject)StateObject to not longer be a childImplements org. StateObject from the list of children.
|
| public void | removeItems(Collection<UpdateItemStateObject>
The items)StateObjects to remove from this oneImplements org. StateObject from the list of children.
|
| public void | removeListChangeListener(String
The name of the list for which the listener was registered listName, IListChangeListener<UpdateItemStateObject> The listener to unregister listener)Implements org. IListChangeListener that was registered for the specified list.
|
| public void | setExpression(UpdateClause
The expression)parsed object representing an UPDATE
clauseKeeps a reference of the |
| protected void | toTextInternal(Appendable
The writer used to print out the string representation writer)Overrides org. StateObject, which should not be used to
define a true string representation of a JPQL query but should be used for
debugging purposes.
|
| items | back to summary |
|---|---|
| private List<UpdateItemStateObject> items The list of | |
| UPDATE_ITEMS_LIST | back to summary |
|---|---|
| public static final String UPDATE_ITEMS_LIST Notify the list of | |
| UpdateClauseStateObject | back to summary |
|---|---|
| public UpdateClauseStateObject(UpdateStatementStateObject parent) Creates a new
| |
| accept | back to summary |
|---|---|
| public void accept(StateObjectVisitor visitor) Implements org. Doc from org. Visits this
| |
| addChildren | back to summary |
|---|---|
| protected void addChildren(List<StateObject> children) Overrides org. Doc from org. Adds the children of this
| |
| addItem | back to summary |
|---|---|
| public UpdateItemStateObject addItem() Adds a new
| |
| addItem | back to summary |
|---|---|
| public UpdateItemStateObject addItem(ListIterator<String> paths, StateObject newValue) Adds a new
| |
| addItem | back to summary |
|---|---|
| public UpdateItemStateObject addItem(ListIterator<String> paths, String newValue) Adds a new
| |
| addItem | back to summary |
|---|---|
| public UpdateItemStateObject addItem(String path) Implements org. Adds a new
| |
| addItem | back to summary |
|---|---|
| public UpdateItemStateObject addItem(String path, StateObject newValue) Adds a new
| |
| addItem | back to summary |
|---|---|
| public UpdateItemStateObject addItem(String path, String newValue) Adds a new
| |
| addItem | back to summary |
|---|---|
| public UpdateItemStateObject addItem(String[] paths, StateObject newValue) Adds a new
| |
| addItem | back to summary |
|---|---|
| public UpdateItemStateObject addItem(String[] paths, String newValue) Adds a new
| |
| addItem | back to summary |
|---|---|
| public <S extends UpdateItemStateObject> S addItem(S item) Implements org. Doc from org. Adds the given
| |
| addItems | back to summary |
|---|---|
| public void addItems(List<? extends UpdateItemStateObject> items) Implements org. Doc from org. Adds the given list of
| |
| addListChangeListener | back to summary |
|---|---|
| public void addListChangeListener(String listName, IListChangeListener<UpdateItemStateObject> listener) Implements org. Doc from org. Registers the given
| |
| areChildrenEquivalent | back to summary |
|---|---|
| protected boolean areChildrenEquivalent(UpdateClauseStateObject stateObject) Determines whether the children of this
| |
| canMoveDown | back to summary |
|---|---|
| public boolean canMoveDown(UpdateItemStateObject item) Implements org. Doc from org. Determines whether the given
| |
| canMoveUp | back to summary |
|---|---|
| public boolean canMoveUp(UpdateItemStateObject item) Implements org. Doc from org. Determines whether the given
| |
| getExpression | back to summary |
|---|---|
| public UpdateClause getExpression() Overrides org. Implements org. Doc from org. Returns the actual parsed object if this
| |
| getIdentifier | back to summary |
|---|---|
| public String getIdentifier() Implements abstract org. Doc from org. Returns the JPQL identifier of this clause. | |
| getItem | back to summary |
|---|---|
| public UpdateItemStateObject getItem(int index) Implements org. Doc from org. Returns the
| |
| getParent | back to summary |
|---|---|
| public UpdateStatementStateObject getParent() Overrides org. Implements org. Doc from org. Returns the parent of this
| |
| hasItems | back to summary |
|---|---|
| public boolean hasItems() Implements org. Doc from org. Determines whether this
| |
| initialize | back to summary |
|---|---|
| protected void initialize() Overrides org. Doc from org. Initializes this state object.
| |
| isEquivalent | back to summary |
|---|---|
| public boolean isEquivalent(StateObject stateObject) Overrides org. Implements org. Doc from org. Determines whether the given
| |
| isIdentificationVariableDefined | back to summary |
|---|---|
| public boolean isIdentificationVariableDefined() Determines whether the identification variable has been defined.
| |
| items | back to summary |
|---|---|
| public ListIterable Implements org. Doc from org. Returns an
| |
| itemsSize | back to summary |
|---|---|
| public int itemsSize() Implements org. Doc from org. Returns the number of children this list holder has.
| |
| moveDown | back to summary |
|---|---|
| public UpdateItemStateObject moveDown(UpdateItemStateObject item) Implements org. Doc from org. Moves the given
| |
| moveUp | back to summary |
|---|---|
| public UpdateItemStateObject moveUp(UpdateItemStateObject item) Implements org. Doc from org. Moves the given
| |
| parse | back to summary |
|---|---|
| public void parse(String jpqlFragment) Parses the given fragment, which represents a single update item, and creates the
| |
| removeItem | back to summary |
|---|---|
| public void removeItem(UpdateItemStateObject stateObject) Implements org. Doc from org. Removes the given
| |
| removeItems | back to summary |
|---|---|
| public void removeItems(Collection<UpdateItemStateObject> items) Implements org. Doc from org. Removes the given
| |
| removeListChangeListener | back to summary |
|---|---|
| public void removeListChangeListener(String listName, IListChangeListener<UpdateItemStateObject> listener) Implements org. Doc from org. Unregisters the given
| |
| setExpression | back to summary |
|---|---|
| public void setExpression(UpdateClause expression) Keeps a reference of the
| |
| toTextInternal | back to summary |
|---|---|
| protected void toTextInternal(Appendable writer) throws IOException Overrides org. Doc from org. Prints out a string representation of this
| |