new_value specified for an update operation must be compatible in type with the
field to which it is assigned.
BNF: update_item ::= [identification_variable.]{state_field | single_valued_association_field} = new_value
UpdateItem
| Modifier and Type | Field and Description |
|---|---|
| private INewValueStateObjectBuilder | builder
The builder is cached during the creation of the new value expression. |
| public static final String | NEW_VALUE_PROPERTY
Notifies the new value property has changed. |
| private StateObject | newValue
The state object representing the new value. |
| private StateFieldPathExpressionStateObject | stateFieldPath
The state object representing the state field path expression. |
| Access | Constructor and Description |
|---|---|
| public | UpdateItemStateObject(UpdateClauseStateObject
The parent of this state object, which cannot be parent)nullCreates a new |
| public | UpdateItemStateObject(UpdateClauseStateObject
The parent of this state object, which cannot be parent, String nullThe state field path to receive the new value path, StateObject The actual expression representing the new value newValue)Creates a new |
| public | UpdateItemStateObject(UpdateClauseStateObject
The parent of this state object, which cannot be parent, String nullThe state field path to receive the new value path, String The JPQL fragment representing the new value newValue)Creates 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 void | appendToPath(String
The sequence of characters to append to the path expression text)Appends the given sequence of characters to the path expression. |
| public INewValueStateObjectBuilder | Returns: A new builder that can be used to quickly create a new value expressionCreates and returns a new |
| public UpdateItem | getExpression()
Overrides org. Implements org. StateObject representation of the JPQL query
was created by parsing an existing JPQL query.
|
| public StateObject | Returns: The new value expression ornull if it's not yet definedReturns the |
| public UpdateClauseStateObject | getParent()
Overrides org. Implements org. StateObject.
|
| public String | Returns: The path expression, which is nevernullReturns the string representation of the path expression. |
| public StateFieldPathExpressionStateObject | |
| public boolean | Returns: true the new value exists; otherwise falseDetermines whether the |
| 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 ListIterable | Returns: AnListIterable over the paths of the state field pathReturns the segments in the state field path in order. |
| public int | |
| public void | parseNewValue(String
The string representation of the new value to parse and to convert into a
newValue)StateObjectParses the given JPQL fragment, which represents the new value. |
| public void | setExpression(UpdateItem
The expression)parsed object representing an update itemKeeps a reference of the |
| public void | setNewValue(StateObject
The newValue)StateObject representing the new valueSets the new value to be the given |
| public void | |
| public void | setPaths(ListIterator<String>
The new path expression paths)Changes the path expression with the list of segments, the identification variable will also be updated with the first segment. |
| public void | |
| public void | setVirtualIdentificationVariable(String
The virtual variable that was generated based on the entity name identificationVariable)The state field path expression is not qualified by the identification variable. |
| protected void | toTextInternal(Appendable
The writer used to print out the string representation writer)Implements abstract org. StateObject, which should not be used to
define a true string representation of a JPQL query but should be used for
debugging purposes.
|
| builder | back to summary |
|---|---|
| private INewValueStateObjectBuilder builder The builder is cached during the creation of the new value expression. | |
| NEW_VALUE_PROPERTY | back to summary |
|---|---|
| public static final String NEW_VALUE_PROPERTY Notifies the new value property has changed. | |
| newValue | back to summary |
|---|---|
| private StateObject newValue The state object representing the new value. | |
| stateFieldPath | back to summary |
|---|---|
| private StateFieldPathExpressionStateObject stateFieldPath The state object representing the state field path expression. | |
| UpdateItemStateObject | back to summary |
|---|---|
| public UpdateItemStateObject(UpdateClauseStateObject parent) Creates a new
| |
| UpdateItemStateObject | back to summary |
|---|---|
| public UpdateItemStateObject(UpdateClauseStateObject parent, String path, StateObject newValue) Creates a new
| |
| UpdateItemStateObject | back to summary |
|---|---|
| public UpdateItemStateObject(UpdateClauseStateObject parent, String path, String newValue) 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
| |
| appendToPath | back to summary |
|---|---|
| public void appendToPath(String text) Appends the given sequence of characters to the path expression. If the sequence does not begin with a dot, then the first segment will be appended to the last segment and then new segments will be created.
| |
| getBuilder | back to summary |
|---|---|
| public INewValueStateObjectBuilder getBuilder() Creates and returns a new
| |
| getExpression | back to summary |
|---|---|
| public UpdateItem getExpression() Overrides org. Implements org. Doc from org. Returns the actual parsed object if this
| |
| getNewValue | back to summary |
|---|---|
| public StateObject getNewValue() Returns the
| |
| getParent | back to summary |
|---|---|
| public UpdateClauseStateObject getParent() Overrides org. Implements org. Doc from org. Returns the parent of this
| |
| getPath | back to summary |
|---|---|
| public String getPath() Returns the string representation of the path expression. If the identification variable is virtual, then it is not part of the result.
| |
| getStateFieldPath | back to summary |
|---|---|
| public StateFieldPathExpressionStateObject getStateFieldPath() Returns | |
| hasNewValue | back to summary |
|---|---|
| public boolean hasNewValue() Determines whether the
| |
| 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
| |
| items | back to summary |
|---|---|
| public ListIterable Returns the segments in the state field path in order.
| |
| itemsSize | back to summary |
|---|---|
| public int itemsSize() Returns the number of segments in the path expression.
| |
| parseNewValue | back to summary |
|---|---|
| public void parseNewValue(String newValue) Parses the given JPQL fragment, which represents the new value.
| |
| setExpression | back to summary |
|---|---|
| public void setExpression(UpdateItem expression) Keeps a reference of the
| |
| setNewValue | back to summary |
|---|---|
| public void setNewValue(StateObject newValue) Sets the new value to be the given
| |
| setPath | back to summary |
|---|---|
| public void setPath(String path) Changes the path expression with the list of segments, the identification variable will also be updated with the first segment.
| |
| setPaths | back to summary |
|---|---|
| public void setPaths(ListIterator<String> paths) Changes the path expression with the list of segments, the identification variable will also be updated with the first segment.
| |
| setPaths | back to summary |
|---|---|
| public void setPaths(String[] paths) Changes the path expression with the list of segments, the identification variable will also be updated with the first segment.
| |
| setVirtualIdentificationVariable | back to summary |
|---|---|
| public void setVirtualIdentificationVariable(String identificationVariable) The state field path expression is not qualified by the identification variable.
| |
| toTextInternal | back to summary |
|---|---|
| protected void toTextInternal(Appendable writer) throws IOException Implements abstract org. Doc from org. Prints out a string representation of this
| |