Class TransactionOptions.Builder (2.24.1)

public static final class TransactionOptions.Builder extends GeneratedMessageV3.Builder<TransactionOptions.Builder> implements TransactionOptionsOrBuilder

Options for beginning a new transaction.

Transactions can be created explicitly with calls to Datastore.BeginTransaction or implicitly by setting ReadOptions.new_transaction in read requests.

Protobuf type google.datastore.v1.TransactionOptions

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TransactionOptions.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TransactionOptions.Builder
Overrides

build()

public TransactionOptions build()
Returns
Type Description
TransactionOptions

buildPartial()

public TransactionOptions buildPartial()
Returns
Type Description
TransactionOptions

clear()

public TransactionOptions.Builder clear()
Returns
Type Description
TransactionOptions.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public TransactionOptions.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
TransactionOptions.Builder
Overrides

clearMode()

public TransactionOptions.Builder clearMode()
Returns
Type Description
TransactionOptions.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public TransactionOptions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
TransactionOptions.Builder
Overrides

clearReadOnly()

public TransactionOptions.Builder clearReadOnly()

The transaction should only allow reads.

.google.datastore.v1.TransactionOptions.ReadOnly read_only = 2;

Returns
Type Description
TransactionOptions.Builder

clearReadWrite()

public TransactionOptions.Builder clearReadWrite()

The transaction should allow both reads and writes.

.google.datastore.v1.TransactionOptions.ReadWrite read_write = 1;

Returns
Type Description
TransactionOptions.Builder

clone()

public TransactionOptions.Builder clone()
Returns
Type Description
TransactionOptions.Builder
Overrides

getDefaultInstanceForType()

public TransactionOptions getDefaultInstanceForType()
Returns
Type Description
TransactionOptions

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getModeCase()

public TransactionOptions.ModeCase getModeCase()
Returns
Type Description
TransactionOptions.ModeCase

getReadOnly()

public TransactionOptions.ReadOnly getReadOnly()

The transaction should only allow reads.

.google.datastore.v1.TransactionOptions.ReadOnly read_only = 2;

Returns
Type Description
TransactionOptions.ReadOnly

The readOnly.

getReadOnlyBuilder()

public TransactionOptions.ReadOnly.Builder getReadOnlyBuilder()

The transaction should only allow reads.

.google.datastore.v1.TransactionOptions.ReadOnly read_only = 2;

Returns
Type Description
TransactionOptions.ReadOnly.Builder

getReadOnlyOrBuilder()

public TransactionOptions.ReadOnlyOrBuilder getReadOnlyOrBuilder()

The transaction should only allow reads.

.google.datastore.v1.TransactionOptions.ReadOnly read_only = 2;

Returns
Type Description
TransactionOptions.ReadOnlyOrBuilder

getReadWrite()

public TransactionOptions.ReadWrite getReadWrite()

The transaction should allow both reads and writes.

.google.datastore.v1.TransactionOptions.ReadWrite read_write = 1;

Returns
Type Description
TransactionOptions.ReadWrite

The readWrite.

getReadWriteBuilder()

public TransactionOptions.ReadWrite.Builder getReadWriteBuilder()

The transaction should allow both reads and writes.

.google.datastore.v1.TransactionOptions.ReadWrite read_write = 1;

Returns
Type Description
TransactionOptions.ReadWrite.Builder

getReadWriteOrBuilder()

public TransactionOptions.ReadWriteOrBuilder getReadWriteOrBuilder()

The transaction should allow both reads and writes.

.google.datastore.v1.TransactionOptions.ReadWrite read_write = 1;

Returns
Type Description
TransactionOptions.ReadWriteOrBuilder

hasReadOnly()

public boolean hasReadOnly()

The transaction should only allow reads.

.google.datastore.v1.TransactionOptions.ReadOnly read_only = 2;

Returns
Type Description
boolean

Whether the readOnly field is set.

hasReadWrite()

public boolean hasReadWrite()

The transaction should allow both reads and writes.

.google.datastore.v1.TransactionOptions.ReadWrite read_write = 1;

Returns
Type Description
boolean

Whether the readWrite field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(TransactionOptions other)

public TransactionOptions.Builder mergeFrom(TransactionOptions other)
Parameter
Name Description
other TransactionOptions
Returns
Type Description
TransactionOptions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TransactionOptions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TransactionOptions.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public TransactionOptions.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
TransactionOptions.Builder
Overrides

mergeReadOnly(TransactionOptions.ReadOnly value)

public TransactionOptions.Builder mergeReadOnly(TransactionOptions.ReadOnly value)

The transaction should only allow reads.

.google.datastore.v1.TransactionOptions.ReadOnly read_only = 2;

Parameter
Name Description
value TransactionOptions.ReadOnly
Returns
Type Description
TransactionOptions.Builder

mergeReadWrite(TransactionOptions.ReadWrite value)

public TransactionOptions.Builder mergeReadWrite(TransactionOptions.ReadWrite value)

The transaction should allow both reads and writes.

.google.datastore.v1.TransactionOptions.ReadWrite read_write = 1;

Parameter
Name Description
value TransactionOptions.ReadWrite
Returns
Type Description
TransactionOptions.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TransactionOptions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TransactionOptions.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public TransactionOptions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TransactionOptions.Builder
Overrides

setReadOnly(TransactionOptions.ReadOnly value)

public TransactionOptions.Builder setReadOnly(TransactionOptions.ReadOnly value)

The transaction should only allow reads.

.google.datastore.v1.TransactionOptions.ReadOnly read_only = 2;

Parameter
Name Description
value TransactionOptions.ReadOnly
Returns
Type Description
TransactionOptions.Builder

setReadOnly(TransactionOptions.ReadOnly.Builder builderForValue)

public TransactionOptions.Builder setReadOnly(TransactionOptions.ReadOnly.Builder builderForValue)

The transaction should only allow reads.

.google.datastore.v1.TransactionOptions.ReadOnly read_only = 2;

Parameter
Name Description
builderForValue TransactionOptions.ReadOnly.Builder
Returns
Type Description
TransactionOptions.Builder

setReadWrite(TransactionOptions.ReadWrite value)

public TransactionOptions.Builder setReadWrite(TransactionOptions.ReadWrite value)

The transaction should allow both reads and writes.

.google.datastore.v1.TransactionOptions.ReadWrite read_write = 1;

Parameter
Name Description
value TransactionOptions.ReadWrite
Returns
Type Description
TransactionOptions.Builder

setReadWrite(TransactionOptions.ReadWrite.Builder builderForValue)

public TransactionOptions.Builder setReadWrite(TransactionOptions.ReadWrite.Builder builderForValue)

The transaction should allow both reads and writes.

.google.datastore.v1.TransactionOptions.ReadWrite read_write = 1;

Parameter
Name Description
builderForValue TransactionOptions.ReadWrite.Builder
Returns
Type Description
TransactionOptions.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public TransactionOptions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
TransactionOptions.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final TransactionOptions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TransactionOptions.Builder
Overrides