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 Details

    • 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.
    • setKind

      public B setKind(String kind)
      Sets the kind of the key.
    • setProjectId

      public B setProjectId(String projectId)
      Sets the project ID of the key.
    • setNamespace

      public B setNamespace(String namespace)
      Sets the namespace of the key.
    • setDatabaseId

      @BetaApi public B setDatabaseId(String databaseId)
      Sets the database id of the key.
    • build

      protected abstract BaseKey build()