Interface QueryMapper.MapperUpdateSetTo
- Enclosing interface:
QueryMapper
public static interface QueryMapper.MapperUpdateSetTo
Represents the value assignment step of the update fluent API.
This step completes a field assignment started with set(String)
by defining the value to be applied. After the value is assigned, the
update query may define additional assignments, specify conditions,
or 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.
The behavior of the update operation depends on the capabilities of the
underlying database.- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionto(T value) Assigns the given value to the previously defined field.
-
Method Details
-
to
Assigns the given value to the previously defined field.template.update(Book.class) .set("publishedYear").to(2025) .where("author").eq("Ada") .execute();- Type Parameters:
T- the value type- Parameters:
value- the value to assign- Returns:
- the next step of the update fluent API
- Throws:
NullPointerException- when value is null
-