Package com.google.cloud.datastore
Class BaseKey
- java.lang.Object
-
- com.google.cloud.datastore.BaseKey
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
IncompleteKey
public abstract class BaseKey extends Object implements Serializable
Base class for keys.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BaseKey.Builder<B extends BaseKey.Builder<B>>
Base class for key builders.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
List<PathElement>
getAncestors()
Returns an immutable list with the key's ancestors.String
getDatabaseId()
String
getKind()
Returns the key's kind.String
getNamespace()
Returns the key's namespace ornull
if not provided.String
getProjectId()
Returns the key's projectId.int
hashCode()
String
toString()
-
-
-
Method Detail
-
getProjectId
public String getProjectId()
Returns the key's projectId.
-
getNamespace
public String getNamespace()
Returns the key's namespace ornull
if not provided.
-
getDatabaseId
@BetaApi public String getDatabaseId()
-
getAncestors
public List<PathElement> getAncestors()
Returns an immutable list with the key's ancestors.
-
getKind
public String getKind()
Returns the key's kind.
-
-