Class KeyUtil
java.lang.Object
com.google.cloud.spring.data.datastore.core.util.KeyUtil
Utility class containing methods for transforming and manipulating Datastore keys.
- Since:
- 1.2
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.cloud.datastore.Key
getKeyWithoutAncestors
(com.google.cloud.datastore.Key entityKey) Returns a copy of the providedentityKey
with its ancestors removed.
-
Method Details
-
getKeyWithoutAncestors
public static com.google.cloud.datastore.Key getKeyWithoutAncestors(com.google.cloud.datastore.Key entityKey) Returns a copy of the providedentityKey
with its ancestors removed.This is useful for performing HAS_ANCESTOR queries in Datastore which do not expect a fully qualified ancestors key list in the provided key.
- Parameters:
entityKey
- The Datastore entity key to transform.- Returns:
- A copy of the
entityKey
with ancestors removed.
-