Uses of Class
com.google.appengine.api.datastore.Key
-
Packages that use Key Package Description com.google.appengine.api.datastore -
-
Uses of Key in com.google.appengine.api.datastore
Methods in com.google.appengine.api.datastore that return Key Modifier and Type Method Description Key
AdminDatastoreService.KeyBuilder. build()
static Key
Entities. createEntityGroupKey(Key key)
Create an __entity_group__ key for the entity group containingkey
.static Key
ExtendableEntityUtil. createKey(Key parent, String kind)
Creates a newKey
with the provided parent and kind.static Key
KeyFactory. createKey(@Nullable Key parent, String kind, long id)
Creates a newKey
with the provided parent from its kind and ID.static Key
KeyFactory. createKey(@Nullable Key parent, String kind, String name)
Creates a newKey
with the provided parent from its kind and name.static Key
KeyFactory. createKey(String kind, long id)
Creates a newKey
having no parent from its kind and ID.static Key
KeyFactory. createKey(String kind, String name)
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
.Key
Query. getAncestor()
Gets the current ancestor for this query, or null if there is no ancestor specified.Key
Key. getChild(String kind, long id)
Creates a new key havingthis
as parent and the given numeric identifier.Key
Key. getChild(String kind, String name)
Creates a new key havingthis
as parent and the given name.Key
KeyRange. getEnd()
Returns the lastKey
in the range.@Nullable Key
EmbeddedEntity. getKey()
Returns the key ornull
.Key
Entity. getKey()
Returns theKey
that represents thisEntity
.Key
EntityNotFoundException. getKey()
Key
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.Key
KeyRange. getStart()
Returns the firstKey
in the range.Key
DatastoreService. put(Entity entity)
If the specifiedEntity
does not yet exist in the data store, create it and assign itsKey
.Key
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 Key Modifier and Type Method Description Future<Map<Key,Entity>>
AdminDatastoreService. get(@Nullable Transaction txn, Iterable<Key> keys)
Future<Map<Key,Entity>>
AdminDatastoreService. get(Iterable<Key> keys)
Future<Map<Key,Entity>>
AsyncDatastoreService. get(@Nullable Transaction txn, Iterable<Key> keys)
Future<Map<Key,Entity>>
AsyncDatastoreService. get(Iterable<Key> keys)
Map<Key,Entity>
DatastoreService. get(Transaction txn, Iterable<Key> keys)
Exhibits the same behavior asDatastoreService.get(Iterable)
, but executes within the provided transaction.Map<Key,Entity>
DatastoreService. get(Iterable<Key> keys)
Retrieves the set ofEntities
matchingkeys
.Iterator<Key>
KeyRange. iterator()
Future<Key>
AdminDatastoreService. put(@Nullable Transaction txn, Entity entity)
Future<List<Key>>
AdminDatastoreService. put(@Nullable Transaction txn, Iterable<Entity> entities)
Future<Key>
AdminDatastoreService. put(Entity entity)
Future<List<Key>>
AdminDatastoreService. put(Iterable<Entity> entities)
Future<Key>
AsyncDatastoreService. put(@Nullable Transaction txn, Entity entity)
Future<List<Key>>
AsyncDatastoreService. put(@Nullable Transaction txn, Iterable<Entity> entities)
Future<Key>
AsyncDatastoreService. put(Entity entity)
Future<List<Key>>
AsyncDatastoreService. put(Iterable<Entity> entities)
List<Key>
DatastoreService. put(Transaction txn, Iterable<Entity> entities)
Exhibits the same behavior asDatastoreService.put(Iterable)
, but executes within the provided transaction.List<Key>
DatastoreService. put(Iterable<Entity> entities)
Performs a batchput
of allentities
.Methods in com.google.appengine.api.datastore with parameters of type Key Modifier and Type Method Description Future<KeyRange>
AdminDatastoreService. allocateIds(@Nullable Key parent, String kind, long num)
Future<KeyRange>
AsyncDatastoreService. allocateIds(@Nullable Key parent, String kind, long num)
KeyRange
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
Key. compareTo(Key other)
Compares twoKey
objects.static Key
Entities. createEntityGroupKey(Key key)
Create an __entity_group__ key for the entity group containingkey
.static Key
ExtendableEntityUtil. createKey(Key parent, String kind)
Creates a newKey
with the provided parent and kind.static Key
KeyFactory. createKey(@Nullable Key parent, String kind, long id)
Creates a newKey
with the provided parent from its kind and ID.static Key
KeyFactory. createKey(@Nullable Key parent, String kind, String name)
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)
Future<Void>
AdminDatastoreService. delete(@Nullable Transaction txn, Key... keys)
Future<Void>
AdminDatastoreService. delete(Key... keys)
Future<Void>
AsyncDatastoreService. delete(@Nullable Transaction txn, Key... keys)
Future<Void>
AsyncDatastoreService. delete(Key... keys)
void
DatastoreService. delete(Key... keys)
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.Future<Entity>
AdminDatastoreService. get(@Nullable Transaction txn, Key key)
Future<Entity>
AdminDatastoreService. get(Key key)
Future<Entity>
AsyncDatastoreService. get(@Nullable Transaction txn, Key key)
Future<Entity>
AsyncDatastoreService. get(Key key)
Entity
DatastoreService. get(Key key)
Retrieves theEntity
with the specifiedKey
.Entity
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
Query. setAncestor(Key ancestor)
Sets an ancestor for this query.void
EmbeddedEntity. setKey(@Nullable Key key)
Method parameters in com.google.appengine.api.datastore with type arguments of type Key Modifier and Type Method Description Future<Void>
AdminDatastoreService. delete(@Nullable Transaction txn, Iterable<Key> keys)
Future<Void>
AdminDatastoreService. delete(Iterable<Key> keys)
Future<Void>
AsyncDatastoreService. delete(@Nullable Transaction txn, Iterable<Key> keys)
Future<Void>
AsyncDatastoreService. delete(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
DatastoreService. delete(Iterable<Key> keys)
Equivalent toDatastoreService.delete(Key...)
.Future<Map<Key,Entity>>
AdminDatastoreService. get(@Nullable Transaction txn, Iterable<Key> keys)
Future<Map<Key,Entity>>
AdminDatastoreService. get(Iterable<Key> keys)
Future<Map<Key,Entity>>
AsyncDatastoreService. get(@Nullable Transaction txn, Iterable<Key> keys)
Future<Map<Key,Entity>>
AsyncDatastoreService. get(Iterable<Key> keys)
Map<Key,Entity>
DatastoreService. get(Transaction txn, Iterable<Key> keys)
Exhibits the same behavior asDatastoreService.get(Iterable)
, but executes within the provided transaction.Map<Key,Entity>
DatastoreService. get(Iterable<Key> keys)
Retrieves the set ofEntities
matchingkeys
.Constructors in com.google.appengine.api.datastore with parameters of type Key Constructor Description Builder(Key key)
Create aBuilder
, establishing the providedKey
as the topmost ancestor.Entity(Key key)
Create a newEntity
uniquely identified by the providedKey
.Entity(String kind, long id, Key parent)
Create a newEntity
with the specified kind and ID and parentEntity
.Entity(String kind, @Nullable Key parent)
Create a newEntity
with the specified kind and parentEntity
.Entity(String kind, String keyName, Key parent)
Create a newEntity
with the specified kind, key name, and parentEntity
.EntityNotFoundException(Key key)
KeyRange(Key parent, String kind, long start, long end)
Query(@Nullable String kind, @Nullable Key ancestor)
Query(Key ancestor)
-