Class KeyFactory (2.20.1)

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
Name Description
projectId String

KeyFactory(String projectId, String namespace)

public KeyFactory(String projectId, String namespace)
Parameters
Name Description
projectId String
namespace String

KeyFactory(String projectId, String namespace, String databaseId)

public KeyFactory(String projectId, String namespace, String databaseId)
Parameters
Name Description
projectId String
namespace String
databaseId String

Methods

build()

protected IncompleteKey build()
Returns
Type Description
IncompleteKey
Overrides

newKey()

public IncompleteKey newKey()
Returns
Type Description
IncompleteKey

newKey(String name)

public Key newKey(String name)
Parameter
Name Description
name String
Returns
Type Description
Key

newKey(long id)

public Key newKey(long id)
Parameter
Name Description
id long
Returns
Type Description
Key

reset()

public KeyFactory reset()

Resets the KeyFactory to its initial state.

Returns
Type Description
KeyFactory

this for chaining