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 classBaseKey.Builder<B extends BaseKey.Builder<B>>Base class for key builders.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)List<PathElement>getAncestors()Returns an immutable list with the key's ancestors.StringgetDatabaseId()StringgetKind()Returns the key's kind.StringgetNamespace()Returns the key's namespace ornullif not provided.StringgetProjectId()Returns the key's projectId.inthashCode()StringtoString()
-
-
-
Method Detail
-
getProjectId
public String getProjectId()
Returns the key's projectId.
-
getNamespace
public String getNamespace()
Returns the key's namespace ornullif 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.
-
-