Interface QueryMapper.MapperUpdateQueryBuild
- All Known Subinterfaces:
-
QueryMapper.MapperUpdateSetStep, QueryMapper.MapperUpdateWhere
- Enclosing interface:
-
QueryMapper
public static interface QueryMapper.MapperUpdateQueryBuild
Represents the final execution step of the update query fluent
API.
This interface defines the terminal operation used to execute an update query after all assignments and conditions have been specified.
@Inject
Template template;
template.update(Book.class)
.set("title").to("Domain-Driven Design with Java")
.set("publishedYear").to(2025)
.where("author").eq("Ada")
.execute();
Support for update operations and conditional execution depends on
the capabilities of the underlying NoSQL database.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes the update query based on the specified assignments and conditions.
-
Method Details
-
execute
void execute()Executes the update query based on the specified assignments and conditions. Use this method to update entities in the database that match the defined criteria.template.update(Book.class) .set("title").to("Domain-Driven Design with Java") .set("publishedYear").to(2025) .where("author").eq("Ada") .execute();- Throws:
-
UnsupportedOperationException- if the underlying NoSQL database does not support a specific update operation or query condition. For example, a wide-column database may not support the OR operator, or a document database may not support the BETWEEN operator. Support for update operations and conditions varies depending on the database provider.
-