Interface MutationSpecification<T>

Type Parameters:
T - The entity type which is the target of the mutation.
All Superinterfaces:
QuerySpecification<T>
All Known Implementing Classes:
MutationSpecificationImpl

@Incubating public interface MutationSpecification<T> extends QuerySpecification<T>
Specialization of QuerySpecification for programmatic customization of mutation queries.

The method restrict(Restriction) allows application of additional filtering to the mutated entity. The static factory methods of Restriction are used to express filtering criteria of various kinds.

 MutationSpecification.create(Book.class, "delete from Book")
         .restrict(Restriction.lessThan(Book_.publicationDate,
                                        LocalDate.ofYearDay(2000,1)))
         .createQuery(session)
         .executeUpdate();
 

Once all restrictions are specified, call createQuery() to obtain an executable mutation query object.

Since:
7.0