Package org.flowable.common.engine.api.query

# Interface DeleteQuery<T extends DeleteQuery<T,U>,U>

All Known Subinterfaces:
  `BatchQuery`, `DmnHistoricDecisionExecutionQuery`, `HistoricActivityInstanceQuery`, `HistoricCaseInstanceQuery`, `HistoricProcessInstanceQuery`, `HistoricTaskInstanceQuery`

public interface DeleteQuery<T extends DeleteQuery<T,U>,U>
Describes methods for Queries that can perform delete operations.

Author:
  Filip Hrisafov

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `delete()`
  Delete all instances that match the query.
  `void`
  `deleteWithRelatedData()`
  Deprecated.
  in favour of using `BatchDeleteQuery.deleteSequentiallyUsingBatch(int, String)` or `delete()` if the query does not support batch delete

- ## Method Details

  - ### delete

    void delete()
    Delete all instances that match the query.

  - ### deleteWithRelatedData

    @Deprecated void deleteWithRelatedData()
    Deprecated.
    in favour of using `BatchDeleteQuery.deleteSequentiallyUsingBatch(int, String)` or `delete()` if the query does not support batch delete
    Delete all instances and their related data that match the query in bulk. Note that only the historical data directly related to the instance will be deleted. This means that for example for historic case/process instances, it will not delete any associated historic case/process instance (these should be deleted through the respective deletion for the particular model) which is owned by another engine (e.g. a process for the cmmn engine). Use the specific deletion methods on the respective history services otherwise: they delete with cascading to all other engines, but are not as performant as the bulk delete here.