Class TransactionOptions.Builder (2.17.6)

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TransactionOptions.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
TransactionOptions.Builder
Overrides

build()

public TransactionOptions build()
Returns
TypeDescription
TransactionOptions

buildPartial()

public TransactionOptions buildPartial()
Returns
TypeDescription
TransactionOptions

clear()

public TransactionOptions.Builder clear()
Returns
TypeDescription
TransactionOptions.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public TransactionOptions.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
TransactionOptions.Builder
Overrides

clearMode()

public TransactionOptions.Builder clearMode()
Returns
TypeDescription
TransactionOptions.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public TransactionOptions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
TransactionOptions.Builder
Overrides

clearReadOnly()

public TransactionOptions.Builder clearReadOnly()

The transaction should only allow reads.

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

Returns
TypeDescription
TransactionOptions.Builder

clearReadWrite()

public TransactionOptions.Builder clearReadWrite()

The transaction should allow both reads and writes.

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

Returns
TypeDescription
TransactionOptions.Builder

clone()

public TransactionOptions.Builder clone()
Returns
TypeDescription
TransactionOptions.Builder
Overrides

getDefaultInstanceForType()

public TransactionOptions getDefaultInstanceForType()
Returns
TypeDescription
TransactionOptions

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getModeCase()

public TransactionOptions.ModeCase getModeCase()
Returns
TypeDescription
TransactionOptions.ModeCase

getReadOnly()

public TransactionOptions.ReadOnly getReadOnly()

The transaction should only allow reads.

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

Returns
TypeDescription
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
TypeDescription
TransactionOptions.ReadOnly.Builder

getReadOnlyOrBuilder()

public TransactionOptions.ReadOnlyOrBuilder getReadOnlyOrBuilder()

The transaction should only allow reads.

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

Returns
TypeDescription
TransactionOptions.ReadOnlyOrBuilder

getReadWrite()

public TransactionOptions.ReadWrite getReadWrite()

The transaction should allow both reads and writes.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
TransactionOptions.ReadWriteOrBuilder

hasReadOnly()

public boolean hasReadOnly()

The transaction should only allow reads.

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

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

Whether the readWrite field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(TransactionOptions other)

public TransactionOptions.Builder mergeFrom(TransactionOptions other)
Parameter
NameDescription
otherTransactionOptions
Returns
TypeDescription
TransactionOptions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TransactionOptions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TransactionOptions.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public TransactionOptions.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueTransactionOptions.ReadOnly
Returns
TypeDescription
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
NameDescription
valueTransactionOptions.ReadWrite
Returns
TypeDescription
TransactionOptions.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TransactionOptions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TransactionOptions.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public TransactionOptions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueTransactionOptions.ReadOnly
Returns
TypeDescription
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
NameDescription
builderForValueTransactionOptions.ReadOnly.Builder
Returns
TypeDescription
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
NameDescription
valueTransactionOptions.ReadWrite
Returns
TypeDescription
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
NameDescription
builderForValueTransactionOptions.ReadWrite.Builder
Returns
TypeDescription
TransactionOptions.Builder

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

public TransactionOptions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
TransactionOptions.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final TransactionOptions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TransactionOptions.Builder
Overrides