Interface CommitRequestOrBuilder (2.29.1)

publicinterface CommitRequestOrBuilderextendsMessageOrBuilder

Implements

MessageOrBuilder

Methods

getDatabaseId()

publicabstractStringgetDatabaseId()

The ID of the database against which to make the request.

'(default)' is not allowed; please use empty string '' to refer the default database.

string database_id = 9;

Returns
Type Description
String

The databaseId.

getDatabaseIdBytes()

publicabstractByteStringgetDatabaseIdBytes()

The ID of the database against which to make the request.

'(default)' is not allowed; please use empty string '' to refer the default database.

string database_id = 9;

Returns
Type Description
ByteString

The bytes for databaseId.

getMode()

publicabstractCommitRequest.ModegetMode()

The type of commit to perform. Defaults to TRANSACTIONAL.

.google.datastore.v1.CommitRequest.Mode mode = 5;

Returns
Type Description
CommitRequest.Mode

The mode.

getModeValue()

publicabstractintgetModeValue()

The type of commit to perform. Defaults to TRANSACTIONAL.

.google.datastore.v1.CommitRequest.Mode mode = 5;

Returns
Type Description
int

The enum numeric value on the wire for mode.

getMutations(int index)

publicabstractMutationgetMutations(intindex)

The mutations to perform.

When mode is TRANSACTIONAL, mutations affecting a single entity are applied in order. The following sequences of mutations affecting a single entity are not permitted in a single Commit request:

  • insert followed by insert
  • update followed by insert
  • upsert followed by insert
  • delete followed by update

    When mode is NON_TRANSACTIONAL, no two mutations may affect a single entity.

repeated .google.datastore.v1.Mutation mutations = 6;

Parameter
Name Description
index int
Returns
Type Description
Mutation

getMutationsCount()

publicabstractintgetMutationsCount()

The mutations to perform.

When mode is TRANSACTIONAL, mutations affecting a single entity are applied in order. The following sequences of mutations affecting a single entity are not permitted in a single Commit request:

  • insert followed by insert
  • update followed by insert
  • upsert followed by insert
  • delete followed by update

    When mode is NON_TRANSACTIONAL, no two mutations may affect a single entity.

repeated .google.datastore.v1.Mutation mutations = 6;

Returns
Type Description
int

getMutationsList()

publicabstractList<Mutation>getMutationsList()

The mutations to perform.

When mode is TRANSACTIONAL, mutations affecting a single entity are applied in order. The following sequences of mutations affecting a single entity are not permitted in a single Commit request:

  • insert followed by insert
  • update followed by insert
  • upsert followed by insert
  • delete followed by update

    When mode is NON_TRANSACTIONAL, no two mutations may affect a single entity.

repeated .google.datastore.v1.Mutation mutations = 6;

Returns
Type Description
List<Mutation>

getMutationsOrBuilder(int index)

publicabstractMutationOrBuildergetMutationsOrBuilder(intindex)

The mutations to perform.

When mode is TRANSACTIONAL, mutations affecting a single entity are applied in order. The following sequences of mutations affecting a single entity are not permitted in a single Commit request:

  • insert followed by insert
  • update followed by insert
  • upsert followed by insert
  • delete followed by update

    When mode is NON_TRANSACTIONAL, no two mutations may affect a single entity.

repeated .google.datastore.v1.Mutation mutations = 6;

Parameter
Name Description
index int
Returns
Type Description
MutationOrBuilder

getMutationsOrBuilderList()

publicabstractList<?extendsMutationOrBuilder>getMutationsOrBuilderList()

The mutations to perform.

When mode is TRANSACTIONAL, mutations affecting a single entity are applied in order. The following sequences of mutations affecting a single entity are not permitted in a single Commit request:

  • insert followed by insert
  • update followed by insert
  • upsert followed by insert
  • delete followed by update

    When mode is NON_TRANSACTIONAL, no two mutations may affect a single entity.

repeated .google.datastore.v1.Mutation mutations = 6;

Returns
Type Description
List<? extends com.google.datastore.v1.MutationOrBuilder>

getProjectId()

publicabstractStringgetProjectId()

Required. The ID of the project against which to make the request.

string project_id = 8 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The projectId.

getProjectIdBytes()

publicabstractByteStringgetProjectIdBytes()

Required. The ID of the project against which to make the request.

string project_id = 8 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for projectId.

getSingleUseTransaction()

publicabstractTransactionOptionsgetSingleUseTransaction()

Options for beginning a new transaction for this request. The transaction is committed when the request completes. If specified, TransactionOptions.mode must be TransactionOptions.ReadWrite.

.google.datastore.v1.TransactionOptions single_use_transaction = 10;

Returns
Type Description
TransactionOptions

The singleUseTransaction.

getSingleUseTransactionOrBuilder()

publicabstractTransactionOptionsOrBuildergetSingleUseTransactionOrBuilder()

Options for beginning a new transaction for this request. The transaction is committed when the request completes. If specified, TransactionOptions.mode must be TransactionOptions.ReadWrite.

.google.datastore.v1.TransactionOptions single_use_transaction = 10;

Returns
Type Description
TransactionOptionsOrBuilder

getTransaction()

publicabstractByteStringgetTransaction()

The identifier of the transaction associated with the commit. A transaction identifier is returned by a call to Datastore.BeginTransaction.

bytes transaction = 1;

Returns
Type Description
ByteString

The transaction.

getTransactionSelectorCase()

publicabstractCommitRequest.TransactionSelectorCasegetTransactionSelectorCase()
Returns
Type Description
CommitRequest.TransactionSelectorCase

hasSingleUseTransaction()

publicabstractbooleanhasSingleUseTransaction()

Options for beginning a new transaction for this request. The transaction is committed when the request completes. If specified, TransactionOptions.mode must be TransactionOptions.ReadWrite.

.google.datastore.v1.TransactionOptions single_use_transaction = 10;

Returns
Type Description
boolean

Whether the singleUseTransaction field is set.

hasTransaction()

publicabstractbooleanhasTransaction()

The identifier of the transaction associated with the commit. A transaction identifier is returned by a call to Datastore.BeginTransaction.

bytes transaction = 1;

Returns
Type Description
boolean

Whether the transaction field is set.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.