public interface Deleter
The top element in the command chain for deleting entities from the datastore.
You can delete entities by either passing in the POJO or their keys. Note that deletes do NOT cascade; you must delete each individual entity in an object graph.
The type()
method allows you to construct keys fluently.
Note that all command objects are immutable.
Modifier and Type | Method and Description |
---|---|
Result<Void> |
entities(Iterable<?> entities)
Begin asynchronous deletion of specific entities.
|
Result<Void> |
entities(Object... entities)
Convenient substitute for entities(Iterable)
|
Result<Void> |
entity(Object entity)
Begin asynchronous deletion of a specific entity.
|
Result<Void> |
key(Key<?> key)
Begin asynchronous deletion of a specific entity.
|
Result<Void> |
keys(Iterable<? extends Key<?>> keys)
Begin asynchronous deletion of specific entities.
|
Result<Void> |
keys(Key<?>... keys)
Convenient substitute for keys(Iterable)
|
DeleteType |
type(Class<?> type)
Begin construction of a key or keys to delete by specifying a kind.
|
DeleteType type(Class<?> type)
All command objects are immutable; this method returns a new object instead of modifying the current command object.
type
- is the kind of object to delete.Result<Void> key(Key<?> key)
Begin asynchronous deletion of a specific entity.
To force synchronous delete, call now() on the returned Result.
key
- defines which entity to deleteResult<Void> keys(Iterable<? extends Key<?>> keys)
Begin asynchronous deletion of specific entities.
To force synchronous delete, call now() on the returned Result.
keys
- defines which entities to deleteResult<Void> entity(Object entity)
Begin asynchronous deletion of a specific entity.
To force synchronous delete, call now() on the returned Result.
entity
- can be an entity or any key-like structure; a Key>, a native datastore Key, or an entity object with valid id/parent fields.Result<Void> entities(Iterable<?> entities)
Begin asynchronous deletion of specific entities.
To force synchronous delete, call now() on the returned Result.
entities
- can be entity instances or any key-like structure; a Key>, a native datastore Key, or an entity object with valid id/parent fields.Copyright © 2016. All rights reserved.