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.
update_clause ::= UPDATE abstract_schema_name [[AS] identification_variable] SET update_item {, update_item}*UpdateStatement, UpdateItem
| Modifier and Type | Field and Description |
|---|---|
| private boolean | hasSpaceAfterRangeVariableDeclaration
Determines whether a whitespace was parsed after the abstract schema name declaration. |
| private boolean | hasSpaceAfterSet
Determines whether a whitespace was parsed after SET. |
| private boolean | hasSpaceAfterUpdate
Determines whether a whitespace was parsed after UPDATE. |
| private AbstractExpression | rangeVariableDeclaration
The |
| private String | setIdentifier
The actual SET identifier found in the string representation of the JPQL query. |
| private String | updateIdentifier
The actual UPDATE identifier found in the string representation of the JPQL query. |
| private AbstractExpression | updateItems
The expression containing the update items. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(ExpressionVisitor
The visitor)ExpressionVisitor to visit this objectImplements org. Expression by the given visitor.
|
| public void | acceptChildren(ExpressionVisitor
The visitor)visitor to visit the children of this object.Implements org. Expression.
|
| protected void | addChildrenTo(Collection<Expression>
The collection used to store the children children)Overrides org. AbstractExpression to the given collection.
|
| protected void | addOrderedChildrenTo(List<Expression>
The list used to store the string representation of this children)AbstractExpressionOverrides org. AbstractExpression to the given list.
|
| public CollectionExpression | Returns: The single update item represented by a temporary collectionCreates a new |
| public JPQLQueryBNF | findQueryBNF(Expression
The expression)Expression that is a descendant of this oneOverrides org. Implements org. JPQLQueryBNF that represents the fragment of this Expression
that was used when parsing the given Expression.
|
| public String | Returns: The SET identifier that was actually parsed, or an empty string if it was not parsedReturns the actual SET found in the string representation of the JPQL query, which has the actual case that was used. |
| public String | Returns: The UPDATE identifier that was actually parsedReturns the actual UPDATE found in the string representation of the JPQL query, which has the actual case that was used. |
| public JPQLQueryBNF | getQueryBNF()
Implements org. Expression.
|
| public Expression | Returns: The expression that was parsed representing the range variable declarationReturns the |
| public Expression | Returns: The expression that was parsed representing the single or multiple update itemsReturns the |
| public boolean | Returns: true if the range variable declaration was parsed; false otherwiseDetermines whether the range variable declaration was parsed. |
| public boolean | Returns: true if SET was part of the query; false otherwiseDetermines whether SET was parsed or not. |
| public boolean | Returns: true if there was a whitespace after the abstract schema name declaration;
false otherwiseDetermines whether a whitespace was found after the abstract schema name declaration. |
| public boolean | Returns: true if there was a whitespace after SET; false otherwiseDetermines whether a whitespace was found after SET. |
| public boolean | Returns: true if there was a whitespace after the identifier UPDATE;
false otherwiseDetermines whether a whitespace was found after the identifier UPDATE. |
| public boolean | Returns: true if something was parsed after SET even if it was a malformed
expression; false if nothing was parsedDetermines whether the update items section of the query was parsed. |
| protected boolean | isParsingComplete(WordParser
The text to parse based on the current position of the cursor wordParser, String The word that was retrieved from the given text, which is the first word in the text word, Expression The expression)Expression that has already been parsedOverrides org. |
| protected void | parse(WordParser
The text to parse based on the current position of the cursor wordParser, boolean Determines whether the parsing system should be tolerant, meaning if it should
try to parse invalid or incomplete queries tolerant)Implements abstract org. WordParser.
|
| protected void | toParsedText(StringBuilder
The buffer used to append this writer, boolean Expression's string representationDetermines whether the string representation should represent what was parsed,
i.e. include any "virtual" whitespace (such as ending whitespace) and the actual case of the
JPQL identifiers actual)Implements abstract org. Expression, including its children,
if it has any.
|
| hasSpaceAfterRangeVariableDeclaration | back to summary |
|---|---|
| private boolean hasSpaceAfterRangeVariableDeclaration Determines whether a whitespace was parsed after the abstract schema name declaration. | |
| hasSpaceAfterSet | back to summary |
|---|---|
| private boolean hasSpaceAfterSet Determines whether a whitespace was parsed after SET. | |
| hasSpaceAfterUpdate | back to summary |
|---|---|
| private boolean hasSpaceAfterUpdate Determines whether a whitespace was parsed after UPDATE. | |
| rangeVariableDeclaration | back to summary |
|---|---|
| private AbstractExpression rangeVariableDeclaration The | |
| setIdentifier | back to summary |
|---|---|
| private String setIdentifier The actual SET identifier found in the string representation of the JPQL query. | |
| updateIdentifier | back to summary |
|---|---|
| private String updateIdentifier The actual UPDATE identifier found in the string representation of the JPQL query. | |
| updateItems | back to summary |
|---|---|
| private AbstractExpression updateItems The expression containing the update items. | |
| UpdateClause | back to summary |
|---|---|
| public UpdateClause(AbstractExpression parent) Creates a new
| |
| accept | back to summary |
|---|---|
| public void accept(ExpressionVisitor visitor) Implements org. Doc from org. Visits this
| |
| acceptChildren | back to summary |
|---|---|
| public void acceptChildren(ExpressionVisitor visitor) Implements org. Doc from org. Visits the children of this
This does not traverse the
| |
| addChildrenTo | back to summary |
|---|---|
| protected void addChildrenTo(Collection<Expression> children) Overrides org. Doc from org. Adds the children of this
| |
| addOrderedChildrenTo | back to summary |
|---|---|
| protected void addOrderedChildrenTo(List<Expression> children) Overrides org. Doc from org. Adds the children of this
| |
| buildCollectionExpression | back to summary |
|---|---|
| public CollectionExpression buildCollectionExpression() Creates a new
| |
| findQueryBNF | back to summary |
|---|---|
| public JPQLQueryBNF findQueryBNF(Expression expression) Overrides org. Implements org. Doc from org. Retrieves the
| |
| getActualSetIdentifier | back to summary |
|---|---|
| public String getActualSetIdentifier() Returns the actual SET found in the string representation of the JPQL query, which has the actual case that was used.
| |
| getActualUpdateIdentifier | back to summary |
|---|---|
| public String getActualUpdateIdentifier() Returns the actual UPDATE found in the string representation of the JPQL query, which has the actual case that was used.
| |
| getQueryBNF | back to summary |
|---|---|
| public JPQLQueryBNF getQueryBNF() Implements org. Doc from org. Returns the BNF of this
| |
| getRangeVariableDeclaration | back to summary |
|---|---|
| public Expression getRangeVariableDeclaration() Returns the
| |
| getUpdateItems | back to summary |
|---|---|
| public Expression getUpdateItems() Returns the
| |
| hasRangeVariableDeclaration | back to summary |
|---|---|
| public boolean hasRangeVariableDeclaration() Determines whether the range variable declaration was parsed.
| |
| hasSet | back to summary |
|---|---|
| public boolean hasSet() Determines whether SET was parsed or not.
| |
| hasSpaceAfterRangeVariableDeclaration | back to summary |
|---|---|
| public boolean hasSpaceAfterRangeVariableDeclaration() Determines whether a whitespace was found after the abstract schema name declaration.
| |
| hasSpaceAfterSet | back to summary |
|---|---|
| public boolean hasSpaceAfterSet() Determines whether a whitespace was found after SET.
| |
| hasSpaceAfterUpdate | back to summary |
|---|---|
| public boolean hasSpaceAfterUpdate() Determines whether a whitespace was found after the identifier UPDATE.
| |
| hasUpdateItems | back to summary |
|---|---|
| public boolean hasUpdateItems() Determines whether the update items section of the query was parsed.
| |
| isParsingComplete | back to summary |
|---|---|
| protected boolean isParsingComplete(WordParser wordParser, String word, Expression expression) Overrides org. Doc from org. Determines whether the parsing is complete based on what is left in the given text. The text is never empty.
| |
| parse | back to summary |
|---|---|
| protected void parse(WordParser wordParser, boolean tolerant) Implements abstract org. Doc from org. Parses the query by starting at the current position, which is part of the given
| |
| toParsedText | back to summary |
|---|---|
| protected void toParsedText(StringBuilder writer, boolean actual) Implements abstract org. Doc from org. Generates a string representation of this
| |