Interface DeferredDeleter


public interface DeferredDeleter

Element in the command chain for deferred deleting entities from the datastore. Note that all methods return void; there is no way to force synchronous execution.

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 Summary

    Modifier and Type
    Method
    Description
    void
    entities(Iterable<?> entities)
    Defer deletion of specific entities.
    void
    entities(Object... entities)
    Convenient substitute for entities(Iterable)
    void
    entity(Object entity)
    Defer deletion of a specific entity.
    void
    key(Key<?> key)
    Defer deletion of a specific entity.
    void
    keys(Key<?>... keys)
    Convenient substitute for keys(Iterable)
    void
    keys(Iterable<? extends Key<?>> keys)
    Defer deletion of specific entities.
    type(Class<?> type)
    Begin construction of a key or keys to delete by specifying a kind.
  • Method Details

    • type

      DeferredDeleteType 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

      void key(Key<?> key)

      Defer deletion of a specific entity.

      Parameters:
      key - defines which entity to delete
    • keys

      void keys(Iterable<? extends Key<?>> keys)

      Defer deletion of specific entities.

      Parameters:
      keys - defines which entities to delete
    • keys

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

      void entity(Object entity)

      Defer deletion of a specific entity.

      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.
    • entities

      void entities(Iterable<?> entities)

      Defer deletion of specific entities.

      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.
    • entities

      void entities(Object... entities)
      Convenient substitute for entities(Iterable)