1 // Copyright 2012 Google Inc. All Rights Reserved.
2 package com
.google
.appengine
.api
.taskqueue
;
4 import com
.google
.appengine
.api
.datastore
.DatastoreServiceFactory
;
5 import com
.google
.appengine
.api
.datastore
.Key
;
8 * A {@link DeferredTask} implementation that deletes the entities uniquely
9 * identified by the provided {@link Key Keys} when it runs.
12 class DatastoreDeleteDeferredTask
implements DeferredTask
{
13 private final Key deleteMe
;
15 public DatastoreDeleteDeferredTask(Key deleteMe
) {
16 if (deleteMe
== null) {
17 throw new NullPointerException("deleteMe cannot be null");
19 this.deleteMe
= deleteMe
;
24 DatastoreServiceFactory
.getDatastoreService().delete(deleteMe
);