Send feedback
Interface DatastoreWriter (2.14.6)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.14.6 keyboard_arrow_down
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.
Parameter Name Description entity
FullEntity <? >
the entity to add
Returns Type Description Entity
an Entity
with the same properties and a key that is either newly allocated or
the same one if key is already complete
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)
Returns Type Description List <Entity >
a list of Entity
ordered by input with the same properties and a key that is
either newly allocated or the same one if was already complete
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.
Parameter 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.
Parameter Name Description entity
FullEntity <? >
the entity to put
Returns Type Description Entity
an Entity
with the same properties and a key that is either newly allocated or
the same one if key is already complete
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.
Returns Type Description List <Entity >
a list of updated or inserted Entity
, ordered by input. Returned keys are
either newly allocated or the same one if was already complete.
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.
Parameter Name Description entities
Entity []
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-04 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-10-04 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-04 UTC."]]