Interface CommitRequestOrBuilder (2.19.0)

public interface CommitRequestOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getDatabaseId()

public abstract String getDatabaseId()

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
TypeDescription
String

The databaseId.

getDatabaseIdBytes()

public abstract ByteString getDatabaseIdBytes()

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
TypeDescription
ByteString

The bytes for databaseId.

getMode()

public abstract CommitRequest.Mode getMode()

The type of commit to perform. Defaults to TRANSACTIONAL.

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

Returns
TypeDescription
CommitRequest.Mode

The mode.

getModeValue()

public abstract int getModeValue()

The type of commit to perform. Defaults to TRANSACTIONAL.

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

Returns
TypeDescription
int

The enum numeric value on the wire for mode.

getMutations(int index)

public abstract Mutation getMutations(int index)

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
NameDescription
indexint
Returns
TypeDescription
Mutation

getMutationsCount()

public abstract int getMutationsCount()

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
TypeDescription
int

getMutationsList()

public abstract List<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
TypeDescription
List<Mutation>

getMutationsOrBuilder(int index)

public abstract MutationOrBuilder getMutationsOrBuilder(int index)

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
NameDescription
indexint
Returns
TypeDescription
MutationOrBuilder

getMutationsOrBuilderList()

public abstract List<? extends MutationOrBuilder> 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
TypeDescription
List<? extends com.google.datastore.v1.MutationOrBuilder>

getProjectId()

public abstract String getProjectId()

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

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

Returns
TypeDescription
String

The projectId.

getProjectIdBytes()

public abstract ByteString getProjectIdBytes()

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

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

Returns
TypeDescription
ByteString

The bytes for projectId.

getSingleUseTransaction()

public abstract TransactionOptions getSingleUseTransaction()

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
TypeDescription
TransactionOptions

The singleUseTransaction.

getSingleUseTransactionOrBuilder()

public abstract TransactionOptionsOrBuilder getSingleUseTransactionOrBuilder()

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
TypeDescription
TransactionOptionsOrBuilder

getTransaction()

public abstract ByteString getTransaction()

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

bytes transaction = 1;

Returns
TypeDescription
ByteString

The transaction.

getTransactionSelectorCase()

public abstract CommitRequest.TransactionSelectorCase getTransactionSelectorCase()
Returns
TypeDescription
CommitRequest.TransactionSelectorCase

hasSingleUseTransaction()

public abstract boolean hasSingleUseTransaction()

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
TypeDescription
boolean

Whether the singleUseTransaction field is set.

hasTransaction()

public abstract boolean hasTransaction()

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

bytes transaction = 1;

Returns
TypeDescription
boolean

Whether the transaction field is set.