Interface DeleteSpecification<T>
- Type Parameters:
T
- The entity type which is the target of the mutation.
- All Superinterfaces:
MutationSpecification<T>
,QuerySpecification<T>
Specialization of
MutationSpecification
for programmatic customization
of delete queries.
- Since:
- 7.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.query.specification.MutationSpecification
MutationSpecification.Augmentation<T>
-
Method Summary
Modifier and TypeMethodDescriptionaugment
(MutationSpecification.Augmentation<T> augmentation) Add an augmentation to the specification.static <T> DeleteSpecification
<T> create
(CriteriaDelete<T> criteriaDelete) Returns a specification reference which can be used to programmatically, iteratively build a MutationQuery based on the given criteria delete, allowing the addition of restrictions.static <T> DeleteSpecification
<T> Returns a specification reference which can be used to programmatically, iteratively build a MutationQuery which deletes the given entity type.restrict
(Restriction<? super T> restriction) Adds a restriction to the query specification.validate
(CriteriaBuilder builder) Validate the query.Methods inherited from interface org.hibernate.query.specification.MutationSpecification
createQuery, createQuery, reference
Methods inherited from interface org.hibernate.query.specification.QuerySpecification
buildCriteria, createQuery
-
Method Details
-
restrict
Description copied from interface:QuerySpecification
Adds a restriction to the query specification.- Specified by:
restrict
in interfaceMutationSpecification<T>
- Specified by:
restrict
in interfaceQuerySpecification<T>
- Parameters:
restriction
- The restriction predicate to be added.- Returns:
this
for method chaining.
-
augment
Description copied from interface:MutationSpecification
Add an augmentation to the specification.- Specified by:
augment
in interfaceMutationSpecification<T>
- Parameters:
augmentation
- A function capable of modifying or augmenting a criteria query.- Returns:
this
for method chaining.
-
validate
Description copied from interface:QuerySpecification
Validate the query.- Specified by:
validate
in interfaceMutationSpecification<T>
- Specified by:
validate
in interfaceQuerySpecification<T>
- Returns:
this
if everything is fine
-
create
Returns a specification reference which can be used to programmatically, iteratively build a MutationQuery which deletes the given entity type.- Type Parameters:
T
- The root entity type for the mutation (the "target").- Parameters:
targetEntityClass
- The target entity type
-
create
Returns a specification reference which can be used to programmatically, iteratively build a MutationQuery based on the given criteria delete, allowing the addition of restrictions.- Type Parameters:
T
- The root entity type for the mutation (the "target").- Parameters:
criteriaDelete
- The criteria delete query
-