# Annotation Type PreDelete (5.0.3)

    public interface PreDelete implements Annotation

Identifies a callback method to be invoked before an [Entity](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.Entity) of any of the specified kinds
is deleted from the datastore. If [#kinds()](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PreDelete#com_google_appengine_api_datastore_PreDelete_kinds__) is not provided the callback will execute for
all kinds. Methods with this annotation must return `void`, must accept a single argument
of type [DeleteContext](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.DeleteContext), must not throw any checked exceptions, must not be static, and
must belong to a class with a no-arg constructor. Neither the method nor the no-arg constructor
of the class to which it belongs are required to be public. Methods with this annotation are free
to throw any unchecked exception they like. Throwing an unchecked exception will prevent
callbacks that have not yet been executed from running, and the exception will propagate to the
code that invoked the datastore operation that resulted in the invocation of the callback.
Throwing an unchecked exception from a callback will prevent the datastore operation from
executing.

## Implements

[Annotation](https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html)

## Methods

### kinds()

    public abstract String[] kinds()

The kinds to which this callback applies. The default value is an empty array, which indicates
that the callback should run for all kinds.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html[]` | The kinds to which this callback applies. |