Package com.google.cloud.datastore
Class BaseKey.Builder<B extends BaseKey.Builder<B>>
- java.lang.Object
-
- com.google.cloud.datastore.BaseKey.Builder<B>
-
- Type Parameters:
B
- the key builder.
- Direct Known Subclasses:
IncompleteKey.Builder
,Key.Builder
,KeyFactory
- Enclosing class:
- BaseKey
public abstract static class BaseKey.Builder<B extends BaseKey.Builder<B>> extends Object
Base class for key builders.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description B
addAncestor(PathElement ancestor)
Adds an ancestor for this key.B
addAncestors(PathElement ancestor, PathElement... other)
Adds the provided ancestors to the key.B
addAncestors(Iterable<PathElement> ancestors)
Adds the provided ancestors to the key.protected abstract BaseKey
build()
B
setDatabaseId(String databaseId)
Sets the database id of the key.B
setKind(String kind)
Sets the kind of the key.B
setNamespace(String namespace)
Sets the namespace of the key.B
setProjectId(String projectId)
Sets the project ID of the key.
-
-
-
Method Detail
-
addAncestor
public B addAncestor(PathElement ancestor)
Adds an ancestor for this key.
-
addAncestors
public B addAncestors(PathElement ancestor, PathElement... other)
Adds the provided ancestors to the key.
-
addAncestors
public B addAncestors(Iterable<PathElement> ancestors)
Adds the provided ancestors to the key.
-
build
protected abstract BaseKey build()
-
-