public interface DatastoreWriter
An interface to represent Google Cloud Datastore write operations.
Methods
add(FullEntity<?> entity)
public abstract Entity add(FullEntity<?> entity)
Datastore add operation: inserts the provided entity. This method will automatically allocate an id if necessary.
Name | Description |
entity | FullEntity<?> the entity to add |
Type | Description |
Entity | an |
add(FullEntity<?>[] entities)
public abstract List<Entity> add(FullEntity<?>[] entities)
Datastore add operation: inserts the provided entities. This method will automatically allocate id for any entity with an incomplete key. See Also: #add(FullEntity)
Name | Description |
entities | FullEntity<?>[] |
Type | Description |
List<Entity> | a list of |
delete(Key[] keys)
public abstract void delete(Key[] keys)
A datastore delete operation. It is OK to request the deletion of a non-existing key.
Name | Description |
keys | Key[] |
put(FullEntity<?> entity)
public abstract Entity put(FullEntity<?> entity)
A Datastore put (a.k.a upsert) operation: inserts an entity if it does not exist, updates it otherwise. This method will automatically allocate an id if necessary.
Name | Description |
entity | FullEntity<?> the entity to put |
Type | Description |
Entity | an |
put(FullEntity<?>[] entities)
public abstract List<Entity> put(FullEntity<?>[] entities)
A Datastore put (a.k.a upsert) operation: creates an entity if it does not exist, updates it otherwise. This method will automatically allocate id for any entity with an incomplete key.
Name | Description |
entities | FullEntity<?>[] |
Type | Description |
List<Entity> | a list of updated or inserted |
update(Entity[] entities)
public abstract void update(Entity[] entities)
A Datastore update operation. The operation will fail if an entity with the same key does not already exist.
Name | Description |
entities | Entity[] |