Class KeyFactory (2.17.6)

public final class KeyFactory extends BaseKey.Builder<KeyFactory>

A helper for creating keys for a specific Datastore, using its associated projectId and namespace.

Inheritance

java.lang.Object > BaseKey.Builder > KeyFactory

Constructors

KeyFactory(String projectId)

public KeyFactory(String projectId)
Parameter
NameDescription
projectIdString

KeyFactory(String projectId, String namespace)

public KeyFactory(String projectId, String namespace)
Parameters
NameDescription
projectIdString
namespaceString

KeyFactory(String projectId, String namespace, String databaseId)

public KeyFactory(String projectId, String namespace, String databaseId)
Parameters
NameDescription
projectIdString
namespaceString
databaseIdString

Methods

build()

protected IncompleteKey build()
Returns
TypeDescription
IncompleteKey
Overrides

newKey()

public IncompleteKey newKey()
Returns
TypeDescription
IncompleteKey

newKey(String name)

public Key newKey(String name)
Parameter
NameDescription
nameString
Returns
TypeDescription
Key

newKey(long id)

public Key newKey(long id)
Parameter
NameDescription
idlong
Returns
TypeDescription
Key

reset()

public KeyFactory reset()

Resets the KeyFactory to its initial state.

Returns
TypeDescription
KeyFactory

this for chaining