Interface Deleter

All Known Implementing Classes:
DeleterImpl

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.

Author:
Jeff Schnitzer invalid input: '<'[email protected]>
  • Method Details

    • type

      DeleteType type(Class<?> type)
      Begin construction of a key or keys to delete by specifying a kind.

      All command objects are immutable; this method returns a new object instead of modifying the current command object.

      Parameters:
      type - is the kind of object to delete.
      Returns:
      the next step in the immutable command chain where you specify a parent and/or ids.
    • key

      Result<Void> key(Key<?> key)

      Begin asynchronous deletion of a specific entity.

      To force synchronous delete, call now() on the returned Result.

      Parameters:
      key - defines which entity to delete
      Returns:
      an asynchronous Result. Call now() to force synchronous deletion.
    • keys

      Result<Void> keys(Iterable<? extends Key<?>> keys)

      Begin asynchronous deletion of specific entities.

      To force synchronous delete, call now() on the returned Result.

      Parameters:
      keys - defines which entities to delete
      Returns:
      an asynchronous Result. Call now() to force synchronous deletion.
    • keys

      Result<Void> keys(Key<?>... keys)
      Convenient substitute for keys(Iterable)
    • entity

      Result<Void> entity(Object entity)

      Begin asynchronous deletion of a specific entity.

      To force synchronous delete, call now() on the returned Result.

      Parameters:
      entity - can be an entity or any key-like structure; a Keyinvalid input: '<'?>, a native datastore Key, or an entity object with valid id/parent fields.
      Returns:
      an asynchronous Result. Call now() to force synchronous deletion.
    • entities

      Result<Void> entities(Iterable<?> entities)

      Begin asynchronous deletion of specific entities.

      To force synchronous delete, call now() on the returned Result.

      Parameters:
      entities - can be entity instances or any key-like structure; a Keyinvalid input: '<'?>, a native datastore Key, or an entity object with valid id/parent fields.
      Returns:
      an asynchronous Result. Call now() to force synchronous deletion.
    • entities

      Result<Void> entities(Object... entities)
      Convenient substitute for entities(Iterable)