Interface QueryMapper.MapperUpdateFrom
- Enclosing interface:
QueryMapper
public static interface QueryMapper.MapperUpdateFrom
Represents the first step in the update query fluent API.
This step defines the entity type to be updated and starts the construction
of an update operation. From this point, one or more update assignments
must be defined using set(...).to(...) before the operation
can be executed.
@Inject
Template template;
template.update(Book.class)
.set("title").to("Domain-Driven Design with Java")
.set("publishedYear").to(2025)
.where("author").eq("Ada")
.execute();
The returned instance is mutable and not thread-safe.
Support for update operations depends on the underlying database.- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionDefines an update assignment for the specified field.
-
Method Details
-
set
Defines an update assignment for the specified field.template.update(Book.class) .set("title").to("Domain-Driven Design with Java") .execute();- Parameters:
name- the field name to be updated- Returns:
- the
QueryMapper.MapperUpdateSetTo - Throws:
NullPointerException- when the field name isnull
-