Uses of Class
com.google.appengine.api.datastore.Key
Packages that use Key
Package
Description
-
Uses of Key in com.google.appengine.api.datastore
Methods in com.google.appengine.api.datastore that return KeyModifier and TypeMethodDescriptionAdminDatastoreService.KeyBuilder.build()
static Key
Entities.createEntityGroupKey
(Key key) Create an __entity_group__ key for the entity group containingkey
.static Key
Creates a newKey
with the provided parent and kind.static Key
Creates a newKey
with the provided parent from its kind and ID.static Key
Creates a newKey
with the provided parent from its kind and name.static Key
Creates a newKey
having no parent from its kind and ID.static Key
Creates a newKey
having no parent from its kind and name.static Key
Entities.createKindKey
(String kind) Create a __kind__ key forkind
.static Key
Entities.createNamespaceKey
(String namespace) Create a __namespace__ key fornamespace
.static Key
Entities.createPropertyKey
(String kind, String property) Create a __property__ key forproperty
ofkind
.Query.getAncestor()
Gets the current ancestor for this query, or null if there is no ancestor specified.Creates a new key havingthis
as parent and the given numeric identifier.Creates a new key havingthis
as parent and the given name.KeyRange.getEnd()
Returns the lastKey
in the range.@Nullable Key
EmbeddedEntity.getKey()
Returns the key ornull
.Entity.getKey()
Returns theKey
that represents thisEntity
.EntityNotFoundException.getKey()
KeyFactory.Builder.getKey()
Returns the most recently addedKey
.@Nullable Key
Entity.getParent()
Get aKey
that corresponds to this the parentEntity
of thisEntity
.@Nullable Key
Key.getParent()
If thisKey
has a parent, return aKey
that represents it.KeyRange.getStart()
Returns the firstKey
in the range.If the specifiedEntity
does not yet exist in the data store, create it and assign itsKey
.DatastoreService.put
(Transaction txn, Entity entity) Exhibits the same behavior asDatastoreService.put(Entity)
, but executes within the provided transaction.static Key
KeyFactory.stringToKey
(String encoded) Converts aString
-representation of aKey
into theKey
instance it represents.Methods in com.google.appengine.api.datastore that return types with arguments of type KeyModifier and TypeMethodDescriptionAdminDatastoreService.get
(@Nullable Transaction txn, Iterable<Key> keys) AsyncDatastoreService.get
(@Nullable Transaction txn, Iterable<Key> keys) DatastoreService.get
(Transaction txn, Iterable<Key> keys) Exhibits the same behavior asDatastoreService.get(Iterable)
, but executes within the provided transaction.Retrieves the set ofEntities
matchingkeys
.KeyRange.iterator()
AdminDatastoreService.put
(@Nullable Transaction txn, Entity entity) AdminDatastoreService.put
(@Nullable Transaction txn, Iterable<Entity> entities) AsyncDatastoreService.put
(@Nullable Transaction txn, Entity entity) AsyncDatastoreService.put
(@Nullable Transaction txn, Iterable<Entity> entities) DatastoreService.put
(Transaction txn, Iterable<Entity> entities) Exhibits the same behavior asDatastoreService.put(Iterable)
, but executes within the provided transaction.Performs a batchput
of allentities
.Methods in com.google.appengine.api.datastore with parameters of type KeyModifier and TypeMethodDescriptionAdminDatastoreService.allocateIds
(@Nullable Key parent, String kind, long num) AsyncDatastoreService.allocateIds
(@Nullable Key parent, String kind, long num) DatastoreService.allocateIds
(Key parent, String kind, long num) IDs are allocated within a namespace defined by a parent key and a kind.static boolean
ExtendableEntityUtil.areKeysEqual
(Key key1, Key key2) Check if the inputKey
objects are equal (including keys that are incomplete).int
Compares twoKey
objects.static Key
Entities.createEntityGroupKey
(Key key) Create an __entity_group__ key for the entity group containingkey
.static Key
Creates a newKey
with the provided parent and kind.static Key
Creates a newKey
with the provided parent from its kind and ID.static Key
Creates a newKey
with the provided parent from its kind and name.static String
KeyFactory.createKeyString
(@Nullable Key parent, String kind, long id) Shorthand for invokingKeyFactory.keyToString(Key)
on the result ofKeyFactory.createKey(Key, String, long)
static String
KeyFactory.createKeyString
(@Nullable Key parent, String kind, String name) Shorthand for invokingKeyFactory.keyToString(Key)
on the result ofKeyFactory.createKey(Key, String, String)
AdminDatastoreService.delete
(@Nullable Transaction txn, Key... keys) AsyncDatastoreService.delete
(@Nullable Transaction txn, Key... keys) void
Deletes theEntity entities
specified bykeys
.void
DatastoreService.delete
(Transaction txn, Key... keys) Exhibits the same behavior asDatastoreService.delete(Key...)
, but executes within the provided transaction.AdminDatastoreService.get
(@Nullable Transaction txn, Key key) AsyncDatastoreService.get
(@Nullable Transaction txn, Key key) Retrieves theEntity
with the specifiedKey
.DatastoreService.get
(Transaction txn, Key key) Exhibits the same behavior asDatastoreService.get(Key)
, but executes within the provided transaction.static @Nullable String
Entities.getNamespaceFromNamespaceKey
(Key namespaceKey) Extract the namespace name from a __namespace__ key.static String
KeyFactory.keyToString
(Key key) Converts aKey
into a websafe string.Query.setAncestor
(Key ancestor) Sets an ancestor for this query.void
Method parameters in com.google.appengine.api.datastore with type arguments of type KeyModifier and TypeMethodDescriptionAdminDatastoreService.delete
(@Nullable Transaction txn, Iterable<Key> keys) AsyncDatastoreService.delete
(@Nullable Transaction txn, Iterable<Key> keys) void
DatastoreService.delete
(Transaction txn, Iterable<Key> keys) Exhibits the same behavior asDatastoreService.delete(Iterable)
, but executes within the provided transaction.void
Equivalent toDatastoreService.delete(Key...)
.AdminDatastoreService.get
(@Nullable Transaction txn, Iterable<Key> keys) AsyncDatastoreService.get
(@Nullable Transaction txn, Iterable<Key> keys) DatastoreService.get
(Transaction txn, Iterable<Key> keys) Exhibits the same behavior asDatastoreService.get(Iterable)
, but executes within the provided transaction.Retrieves the set ofEntities
matchingkeys
.Constructors in com.google.appengine.api.datastore with parameters of type KeyModifierConstructorDescriptionCreate aBuilder
, establishing the providedKey
as the topmost ancestor.Create a newEntity
uniquely identified by the providedKey
.Create a newEntity
with the specified kind and ID and parentEntity
.Create a newEntity
with the specified kind and parentEntity
.Create a newEntity
with the specified kind, key name, and parentEntity
.