Class DeleterImpl

  • All Implemented Interfaces:
    Deleter

    public class DeleterImpl
    extends Object
    implements Deleter
    Implementation of the Delete command.
    Author:
    Jeff Schnitzer
    • Constructor Detail

    • Method Detail

      • type

        public DeleteType type​(Class<?> type)
        Description copied from interface: Deleter
        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.

        Specified by:
        type in interface Deleter
        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

        public Result<Void> key​(Key<?> key)
        Description copied from interface: Deleter

        Begin asynchronous deletion of a specific entity.

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

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

        public Result<Void> keys​(Key<?>... keys)
        Description copied from interface: Deleter
        Convenient substitute for keys(Iterable)
        Specified by:
        keys in interface Deleter
      • keys

        public Result<Void> keys​(Iterable<? extends Key<?>> keys)
        Description copied from interface: Deleter

        Begin asynchronous deletion of specific entities.

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

        Specified by:
        keys in interface Deleter
        Parameters:
        keys - defines which entities to delete
        Returns:
        an asynchronous Result. Call now() to force synchronous deletion.
      • entity

        public Result<Void> entity​(Object entity)
        Description copied from interface: Deleter

        Begin asynchronous deletion of a specific entity.

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

        Specified by:
        entity in interface Deleter
        Parameters:
        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.
        Returns:
        an asynchronous Result. Call now() to force synchronous deletion.
      • entities

        public Result<Void> entities​(Iterable<?> entities)
        Description copied from interface: Deleter

        Begin asynchronous deletion of specific entities.

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

        Specified by:
        entities in interface Deleter
        Parameters:
        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.
        Returns:
        an asynchronous Result. Call now() to force synchronous deletion.
      • entities

        public Result<Void> entities​(Object... entities)
        Description copied from interface: Deleter
        Convenient substitute for entities(Iterable)
        Specified by:
        entities in interface Deleter