CriteriaUpdate interface defines functionality for performing
bulk update operations using the Criteria API.
Criteria API bulk update operations map directly to database update operations, bypassing any optimistic locking checks. Portable applications using bulk update operations must manually update the value of the version column, if desired, and/or manually validate the value of the version column. The persistence context is not synchronized with the result of the bulk update.
A CriteriaUpdate object must have a single root.
| Modifier and Type | Method and Description |
|---|---|
| public Root | |
| public Root | Returns: query root corresponding to the given entitymetamodel entity representing the entity
of type X entity)Create and add a query root corresponding to the entity that is the target of the update. |
| public Root | |
| public <Y, X extends Y> CriteriaUpdate | Returns: the modified update queryattribute to be updated attribute, X new value value)Update the value of the specified attribute. |
| public <Y> CriteriaUpdate | Returns: the modified update queryattribute to be updated attribute, Expression<? extends Y> new value value)Update the value of the specified attribute. |
| public <Y, X extends Y> CriteriaUpdate | |
| public <Y> CriteriaUpdate | Returns: the modified update queryattribute to be updated attribute, Expression<? extends Y> new value value)Update the value of the specified attribute. |
| public CriteriaUpdate | |
| public CriteriaUpdate | Returns: the modified update querya simple or compound boolean expression restriction)Modify the update query to restrict the target of the update according to the specified boolean expression. |
| public CriteriaUpdate |
| from | back to summary |
|---|---|
| public Root Create and add a query root corresponding to the entity
that is the target of the update.
A | |
| from | back to summary |
|---|---|
| public Root Create and add a query root corresponding to the entity
that is the target of the update.
A
| |
| getRoot | back to summary |
|---|---|
| public Root Return the query root.
| |
| set | back to summary |
|---|---|
| public <Y, X extends Y> CriteriaUpdate Update the value of the specified attribute.
| |
| set | back to summary |
|---|---|
| public <Y> CriteriaUpdate Update the value of the specified attribute.
| |
| set | back to summary |
|---|---|
| public <Y, X extends Y> CriteriaUpdate Update the value of the specified attribute.
| |
| set | back to summary |
|---|---|
| public <Y> CriteriaUpdate Update the value of the specified attribute.
| |
| set | back to summary |
|---|---|
| public CriteriaUpdate Update the value of the specified attribute.
| |
| where | back to summary |
|---|---|
| public CriteriaUpdate Modify the update query to restrict the target of the update according to the specified boolean expression. Replaces the previously added restriction(s), if any.
| |
| where | back to summary |
|---|---|
| public CriteriaUpdate Modify the update query to restrict the target of the update according to the conjunction of the specified restriction predicates. Replaces the previously added restriction(s), if any. If no restrictions are specified, any previously added restrictions are simply removed.
| |