Class ReadOptions.Builder (2.22.0)

publicstaticfinalclass ReadOptions.BuilderextendsGeneratedMessageV3.Builder<ReadOptions.Builder>implementsReadOptionsOrBuilder

The options shared by read requests.

Protobuf type google.datastore.v1.ReadOptions

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
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()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicReadOptions.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ReadOptions.Builder
Overrides

build()

publicReadOptionsbuild()
Returns
Type Description
ReadOptions

buildPartial()

publicReadOptionsbuildPartial()
Returns
Type Description
ReadOptions

clear()

publicReadOptions.Builderclear()
Returns
Type Description
ReadOptions.Builder
Overrides

clearConsistencyType()

publicReadOptions.BuilderclearConsistencyType()
Returns
Type Description
ReadOptions.Builder

clearField(Descriptors.FieldDescriptor field)

publicReadOptions.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ReadOptions.Builder
Overrides

clearNewTransaction()

publicReadOptions.BuilderclearNewTransaction()

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Returns
Type Description
ReadOptions.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

publicReadOptions.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ReadOptions.Builder
Overrides

clearReadConsistency()

publicReadOptions.BuilderclearReadConsistency()

The non-transactional read consistency to use.

.google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;

Returns
Type Description
ReadOptions.Builder

This builder for chaining.

clearReadTime()

publicReadOptions.BuilderclearReadTime()

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Returns
Type Description
ReadOptions.Builder

clearTransaction()

publicReadOptions.BuilderclearTransaction()

The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction.

bytes transaction = 2;

Returns
Type Description
ReadOptions.Builder

This builder for chaining.

clone()

publicReadOptions.Builderclone()
Returns
Type Description
ReadOptions.Builder
Overrides

getConsistencyTypeCase()

publicReadOptions.ConsistencyTypeCasegetConsistencyTypeCase()
Returns
Type Description
ReadOptions.ConsistencyTypeCase

getDefaultInstanceForType()

publicReadOptionsgetDefaultInstanceForType()
Returns
Type Description
ReadOptions

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getNewTransaction()

publicTransactionOptionsgetNewTransaction()

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Returns
Type Description
TransactionOptions

The newTransaction.

getNewTransactionBuilder()

publicTransactionOptions.BuildergetNewTransactionBuilder()

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Returns
Type Description
TransactionOptions.Builder

getNewTransactionOrBuilder()

publicTransactionOptionsOrBuildergetNewTransactionOrBuilder()

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Returns
Type Description
TransactionOptionsOrBuilder

getReadConsistency()

publicReadOptions.ReadConsistencygetReadConsistency()

The non-transactional read consistency to use.

.google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;

Returns
Type Description
ReadOptions.ReadConsistency

The readConsistency.

getReadConsistencyValue()

publicintgetReadConsistencyValue()

The non-transactional read consistency to use.

.google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;

Returns
Type Description
int

The enum numeric value on the wire for readConsistency.

getReadTime()

publicTimestampgetReadTime()

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Returns
Type Description
Timestamp

The readTime.

getReadTimeBuilder()

publicTimestamp.BuildergetReadTimeBuilder()

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Returns
Type Description
Builder

getReadTimeOrBuilder()

publicTimestampOrBuildergetReadTimeOrBuilder()

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Returns
Type Description
TimestampOrBuilder

getTransaction()

publicByteStringgetTransaction()

The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction.

bytes transaction = 2;

Returns
Type Description
ByteString

The transaction.

hasNewTransaction()

publicbooleanhasNewTransaction()

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Returns
Type Description
boolean

Whether the newTransaction field is set.

hasReadConsistency()

publicbooleanhasReadConsistency()

The non-transactional read consistency to use.

.google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;

Returns
Type Description
boolean

Whether the readConsistency field is set.

hasReadTime()

publicbooleanhasReadTime()

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Returns
Type Description
boolean

Whether the readTime field is set.

hasTransaction()

publicbooleanhasTransaction()

The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction.

bytes transaction = 2;

Returns
Type Description
boolean

Whether the transaction field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ReadOptions other)

publicReadOptions.BuildermergeFrom(ReadOptionsother)
Parameter
Name Description
other ReadOptions
Returns
Type Description
ReadOptions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicReadOptions.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadOptions.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicReadOptions.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
ReadOptions.Builder
Overrides

mergeNewTransaction(TransactionOptions value)

publicReadOptions.BuildermergeNewTransaction(TransactionOptionsvalue)

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Parameter
Name Description
value TransactionOptions
Returns
Type Description
ReadOptions.Builder

mergeReadTime(Timestamp value)

publicReadOptions.BuildermergeReadTime(Timestampvalue)

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Parameter
Name Description
value Timestamp
Returns
Type Description
ReadOptions.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalReadOptions.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ReadOptions.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

publicReadOptions.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ReadOptions.Builder
Overrides

setNewTransaction(TransactionOptions value)

publicReadOptions.BuildersetNewTransaction(TransactionOptionsvalue)

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Parameter
Name Description
value TransactionOptions
Returns
Type Description
ReadOptions.Builder

setNewTransaction(TransactionOptions.Builder builderForValue)

publicReadOptions.BuildersetNewTransaction(TransactionOptions.BuilderbuilderForValue)

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

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

setReadConsistency(ReadOptions.ReadConsistency value)

publicReadOptions.BuildersetReadConsistency(ReadOptions.ReadConsistencyvalue)

The non-transactional read consistency to use.

.google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;

Parameter
Name Description
value ReadOptions.ReadConsistency

The readConsistency to set.

Returns
Type Description
ReadOptions.Builder

This builder for chaining.

setReadConsistencyValue(int value)

publicReadOptions.BuildersetReadConsistencyValue(intvalue)

The non-transactional read consistency to use.

.google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;

Parameter
Name Description
value int

The enum numeric value on the wire for readConsistency to set.

Returns
Type Description
ReadOptions.Builder

This builder for chaining.

setReadTime(Timestamp value)

publicReadOptions.BuildersetReadTime(Timestampvalue)

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Parameter
Name Description
value Timestamp
Returns
Type Description
ReadOptions.Builder

setReadTime(Timestamp.Builder builderForValue)

publicReadOptions.BuildersetReadTime(Timestamp.BuilderbuilderForValue)

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
ReadOptions.Builder

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

publicReadOptions.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ReadOptions.Builder
Overrides

setTransaction(ByteString value)

publicReadOptions.BuildersetTransaction(ByteStringvalue)

The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction.

bytes transaction = 2;

Parameter
Name Description
value ByteString

The transaction to set.

Returns
Type Description
ReadOptions.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalReadOptions.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ReadOptions.Builder
Overrides

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.