Class BaseKey.Builder<B> (2.17.6)

public abstract static class BaseKey.Builder<B>

Base class for key builders.

Inheritance

java.lang.Object > BaseKey.Builder<B>

Type Parameter

NameDescription
B

Methods

addAncestor(PathElement ancestor)

public B addAncestor(PathElement ancestor)

Adds an ancestor for this key.

Parameter
NameDescription
ancestorPathElement
Returns
TypeDescription
B

addAncestors(PathElement ancestor, PathElement[] other)

public B addAncestors(PathElement ancestor, PathElement[] other)

Adds the provided ancestors to the key.

Parameters
NameDescription
ancestorPathElement
otherPathElement[]
Returns
TypeDescription
B

addAncestors(Iterable<PathElement> ancestors)

public B addAncestors(Iterable<PathElement> ancestors)

Adds the provided ancestors to the key.

Parameter
NameDescription
ancestorsIterable<PathElement>
Returns
TypeDescription
B

build()

protected abstract BaseKey build()
Returns
TypeDescription
BaseKey

setDatabaseId(String databaseId)

public B setDatabaseId(String databaseId)

Sets the database id of the key.

Parameter
NameDescription
databaseIdString
Returns
TypeDescription
B

setKind(String kind)

public B setKind(String kind)

Sets the kind of the key.

Parameter
NameDescription
kindString
Returns
TypeDescription
B

setNamespace(String namespace)

public B setNamespace(String namespace)

Sets the namespace of the key.

Parameter
NameDescription
namespaceString
Returns
TypeDescription
B

setProjectId(String projectId)

public B setProjectId(String projectId)

Sets the project ID of the key.

Parameter
NameDescription
projectIdString
Returns
TypeDescription
B