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
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public TransactionOptions.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public TransactionOptions build()
buildPartial()
public TransactionOptions buildPartial()
clear()
public TransactionOptions.Builder clear()
Overrides
clearField(Descriptors.FieldDescriptor field)
public TransactionOptions.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearMode()
public TransactionOptions.Builder clearMode()
clearOneof(Descriptors.OneofDescriptor oneof)
public TransactionOptions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearReadOnly()
public TransactionOptions.Builder clearReadOnly()
The transaction should only allow reads.
.google.datastore.v1.TransactionOptions.ReadOnly read_only = 2;
clearReadWrite()
public TransactionOptions.Builder clearReadWrite()
The transaction should allow both reads and writes.
.google.datastore.v1.TransactionOptions.ReadWrite read_write = 1;
clone()
public TransactionOptions.Builder clone()
Overrides
getDefaultInstanceForType()
public TransactionOptions getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getModeCase()
public TransactionOptions.ModeCase getModeCase()
getReadOnly()
public TransactionOptions.ReadOnly getReadOnly()
The transaction should only allow reads.
.google.datastore.v1.TransactionOptions.ReadOnly read_only = 2;
getReadOnlyBuilder()
public TransactionOptions.ReadOnly.Builder getReadOnlyBuilder()
The transaction should only allow reads.
.google.datastore.v1.TransactionOptions.ReadOnly read_only = 2;
getReadOnlyOrBuilder()
public TransactionOptions.ReadOnlyOrBuilder getReadOnlyOrBuilder()
The transaction should only allow reads.
.google.datastore.v1.TransactionOptions.ReadOnly read_only = 2;
getReadWrite()
public TransactionOptions.ReadWrite getReadWrite()
The transaction should allow both reads and writes.
.google.datastore.v1.TransactionOptions.ReadWrite read_write = 1;
getReadWriteBuilder()
public TransactionOptions.ReadWrite.Builder getReadWriteBuilder()
The transaction should allow both reads and writes.
.google.datastore.v1.TransactionOptions.ReadWrite read_write = 1;
getReadWriteOrBuilder()
public TransactionOptions.ReadWriteOrBuilder getReadWriteOrBuilder()
The transaction should allow both reads and writes.
.google.datastore.v1.TransactionOptions.ReadWrite read_write = 1;
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()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(TransactionOptions other)
public TransactionOptions.Builder mergeFrom(TransactionOptions other)
public TransactionOptions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public TransactionOptions.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
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;
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;
mergeUnknownFields(UnknownFieldSet unknownFields)
public final TransactionOptions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public TransactionOptions.Builder setField(Descriptors.FieldDescriptor field, Object value)
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;
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;
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;
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;
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public TransactionOptions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final TransactionOptions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides