All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.googlecode.objectify.cmd.DeleteIds Maven / Gradle / Ivy

There is a newer version: 6.1.2
Show newest version
package com.googlecode.objectify.cmd;

import com.googlecode.objectify.Result;


/**
 * 

Terminator methods for a delete-by-key command chain which constructs the key implicitly from * type, id, and (optionally) parent.

* *

Deletes do NOT cascade; you must delete each individual entity in an object graph.

* *

All command objects are immutable.

* * @author Jeff Schnitzer */ public interface DeleteIds { /** *

Specify the numeric id of an entity and start asynchronous deletion.

* * @param id - the id of the entity to delete. Note that numeric ids and String ids are not equivalent; 123 and "123" are different ids. * @return an asynchronous Result of the deletion. Force synchronous delete by calling Result.now(). */ Result id(long id); /** *

Specify the String id of an entity and start asynchronous deletion.

* * @param id - the id of the entity to delete. Note that numeric ids and String ids are not equivalent; 123 and "123" are different ids. * @return an asynchronous Result of the deletion. Force synchronous delete by calling Result.now(). */ Result id(String id); /** *

Specify the numeric ids of multiple entities and start asynchronous deletion.

* * @param ids - the ids of the entity to delete. Note that numeric ids and String ids are not equivalent; 123 and "123" are different ids. * @return an asynchronous Result of the deletion. Force synchronous delete by calling Result.now(). */ Result ids(long... ids); /** *

Specify the String ids of multiple entities and start asynchronous deletion.

* * @param ids - the ids of the entity to delete. Note that numeric ids and String ids are not equivalent; 123 and "123" are different ids. * @return an asynchronous Result of the deletion. Force synchronous delete by calling Result.now(). */ Result ids(String... ids); /** *

Specify the ids of multiple entities and start asynchronous deletion.

* * @param ids - the ids of the entities to delete. The Iterator must provide Long or String. Note that numeric ids and String ids are not equivalent; 123 and "123" are different ids. * @return an asynchronous Result of the deletion. Force synchronous delete by calling Result.now(). */ Result ids(Iterable ids); }