Class QueryResultBatch.Builder (2.32.3)

publicstaticfinalclass QueryResultBatch.BuilderextendsGeneratedMessageV3.Builder<QueryResultBatch.Builder>implementsQueryResultBatchOrBuilder

A batch of results produced by a query.

Protobuf type google.datastore.v1.QueryResultBatch

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

addAllEntityResults(Iterable<? extends EntityResult> values)

publicQueryResultBatch.BuilderaddAllEntityResults(Iterable<?extendsEntityResult>values)

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Parameter
Name Description
values Iterable<? extends com.google.datastore.v1.EntityResult>
Returns
Type Description
QueryResultBatch.Builder

addEntityResults(EntityResult value)

publicQueryResultBatch.BuilderaddEntityResults(EntityResultvalue)

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Parameter
Name Description
value EntityResult
Returns
Type Description
QueryResultBatch.Builder

addEntityResults(EntityResult.Builder builderForValue)

publicQueryResultBatch.BuilderaddEntityResults(EntityResult.BuilderbuilderForValue)

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Parameter
Name Description
builderForValue EntityResult.Builder
Returns
Type Description
QueryResultBatch.Builder

addEntityResults(int index, EntityResult value)

publicQueryResultBatch.BuilderaddEntityResults(intindex,EntityResultvalue)

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Parameters
Name Description
index int
value EntityResult
Returns
Type Description
QueryResultBatch.Builder

addEntityResults(int index, EntityResult.Builder builderForValue)

publicQueryResultBatch.BuilderaddEntityResults(intindex,EntityResult.BuilderbuilderForValue)

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Parameters
Name Description
index int
builderForValue EntityResult.Builder
Returns
Type Description
QueryResultBatch.Builder

addEntityResultsBuilder()

publicEntityResult.BuilderaddEntityResultsBuilder()

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Returns
Type Description
EntityResult.Builder

addEntityResultsBuilder(int index)

publicEntityResult.BuilderaddEntityResultsBuilder(intindex)

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Parameter
Name Description
index int
Returns
Type Description
EntityResult.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

publicQueryResultBatchbuild()
Returns
Type Description
QueryResultBatch

buildPartial()

publicQueryResultBatchbuildPartial()
Returns
Type Description
QueryResultBatch

clear()

publicQueryResultBatch.Builderclear()
Returns
Type Description
QueryResultBatch.Builder
Overrides

clearEndCursor()

publicQueryResultBatch.BuilderclearEndCursor()

A cursor that points to the position after the last result in the batch.

bytes end_cursor = 4;

Returns
Type Description
QueryResultBatch.Builder

This builder for chaining.

clearEntityResultType()

publicQueryResultBatch.BuilderclearEntityResultType()

The result type for every entity in entity_results.

.google.datastore.v1.EntityResult.ResultType entity_result_type = 1;

Returns
Type Description
QueryResultBatch.Builder

This builder for chaining.

clearEntityResults()

publicQueryResultBatch.BuilderclearEntityResults()

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Returns
Type Description
QueryResultBatch.Builder

clearField(Descriptors.FieldDescriptor field)

publicQueryResultBatch.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
QueryResultBatch.Builder
Overrides

clearMoreResults()

publicQueryResultBatch.BuilderclearMoreResults()

The state of the query after the current batch.

.google.datastore.v1.QueryResultBatch.MoreResultsType more_results = 5;

Returns
Type Description
QueryResultBatch.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicQueryResultBatch.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
QueryResultBatch.Builder
Overrides

clearReadTime()

publicQueryResultBatch.BuilderclearReadTime()

Read timestamp this batch was returned from. This applies to the range of results from the query's start_cursor (or the beginning of the query if no cursor was given) to this batch's end_cursor (not the query's end_cursor).

In a single transaction, subsequent query result batches for the same query can have a greater timestamp. Each batch's read timestamp is valid for all preceding batches. This value will not be set for eventually consistent queries in Cloud Datastore.

.google.protobuf.Timestamp read_time = 8;

Returns
Type Description
QueryResultBatch.Builder

clearSkippedCursor()

publicQueryResultBatch.BuilderclearSkippedCursor()

A cursor that points to the position after the last skipped result. Will be set when skipped_results != 0.

bytes skipped_cursor = 3;

Returns
Type Description
QueryResultBatch.Builder

This builder for chaining.

clearSkippedResults()

publicQueryResultBatch.BuilderclearSkippedResults()

The number of results skipped, typically because of an offset.

int32 skipped_results = 6;

Returns
Type Description
QueryResultBatch.Builder

This builder for chaining.

clearSnapshotVersion()

publicQueryResultBatch.BuilderclearSnapshotVersion()

The version number of the snapshot this batch was returned from. This applies to the range of results from the query's start_cursor (or the beginning of the query if no cursor was given) to this batch's end_cursor (not the query's end_cursor).

In a single transaction, subsequent query result batches for the same query can have a greater snapshot version number. Each batch's snapshot version is valid for all preceding batches. The value will be zero for eventually consistent queries.

int64 snapshot_version = 7;

Returns
Type Description
QueryResultBatch.Builder

This builder for chaining.

clone()

publicQueryResultBatch.Builderclone()
Returns
Type Description
QueryResultBatch.Builder
Overrides

getDefaultInstanceForType()

publicQueryResultBatchgetDefaultInstanceForType()
Returns
Type Description
QueryResultBatch

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEndCursor()

publicByteStringgetEndCursor()

A cursor that points to the position after the last result in the batch.

bytes end_cursor = 4;

Returns
Type Description
ByteString

The endCursor.

getEntityResultType()

publicEntityResult.ResultTypegetEntityResultType()

The result type for every entity in entity_results.

.google.datastore.v1.EntityResult.ResultType entity_result_type = 1;

Returns
Type Description
EntityResult.ResultType

The entityResultType.

getEntityResultTypeValue()

publicintgetEntityResultTypeValue()

The result type for every entity in entity_results.

.google.datastore.v1.EntityResult.ResultType entity_result_type = 1;

Returns
Type Description
int

The enum numeric value on the wire for entityResultType.

getEntityResults(int index)

publicEntityResultgetEntityResults(intindex)

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Parameter
Name Description
index int
Returns
Type Description
EntityResult

getEntityResultsBuilder(int index)

publicEntityResult.BuildergetEntityResultsBuilder(intindex)

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Parameter
Name Description
index int
Returns
Type Description
EntityResult.Builder

getEntityResultsBuilderList()

publicList<EntityResult.Builder>getEntityResultsBuilderList()

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Returns
Type Description
List<Builder>

getEntityResultsCount()

publicintgetEntityResultsCount()

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Returns
Type Description
int

getEntityResultsList()

publicList<EntityResult>getEntityResultsList()

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Returns
Type Description
List<EntityResult>

getEntityResultsOrBuilder(int index)

publicEntityResultOrBuildergetEntityResultsOrBuilder(intindex)

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Parameter
Name Description
index int
Returns
Type Description
EntityResultOrBuilder

getEntityResultsOrBuilderList()

publicList<?extendsEntityResultOrBuilder>getEntityResultsOrBuilderList()

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Returns
Type Description
List<? extends com.google.datastore.v1.EntityResultOrBuilder>

getMoreResults()

publicQueryResultBatch.MoreResultsTypegetMoreResults()

The state of the query after the current batch.

.google.datastore.v1.QueryResultBatch.MoreResultsType more_results = 5;

Returns
Type Description
QueryResultBatch.MoreResultsType

The moreResults.

getMoreResultsValue()

publicintgetMoreResultsValue()

The state of the query after the current batch.

.google.datastore.v1.QueryResultBatch.MoreResultsType more_results = 5;

Returns
Type Description
int

The enum numeric value on the wire for moreResults.

getReadTime()

publicTimestampgetReadTime()

Read timestamp this batch was returned from. This applies to the range of results from the query's start_cursor (or the beginning of the query if no cursor was given) to this batch's end_cursor (not the query's end_cursor).

In a single transaction, subsequent query result batches for the same query can have a greater timestamp. Each batch's read timestamp is valid for all preceding batches. This value will not be set for eventually consistent queries in Cloud Datastore.

.google.protobuf.Timestamp read_time = 8;

Returns
Type Description
Timestamp

The readTime.

getReadTimeBuilder()

publicTimestamp.BuildergetReadTimeBuilder()

Read timestamp this batch was returned from. This applies to the range of results from the query's start_cursor (or the beginning of the query if no cursor was given) to this batch's end_cursor (not the query's end_cursor).

In a single transaction, subsequent query result batches for the same query can have a greater timestamp. Each batch's read timestamp is valid for all preceding batches. This value will not be set for eventually consistent queries in Cloud Datastore.

.google.protobuf.Timestamp read_time = 8;

Returns
Type Description
Builder

getReadTimeOrBuilder()

publicTimestampOrBuildergetReadTimeOrBuilder()

Read timestamp this batch was returned from. This applies to the range of results from the query's start_cursor (or the beginning of the query if no cursor was given) to this batch's end_cursor (not the query's end_cursor).

In a single transaction, subsequent query result batches for the same query can have a greater timestamp. Each batch's read timestamp is valid for all preceding batches. This value will not be set for eventually consistent queries in Cloud Datastore.

.google.protobuf.Timestamp read_time = 8;

Returns
Type Description
TimestampOrBuilder

getSkippedCursor()

publicByteStringgetSkippedCursor()

A cursor that points to the position after the last skipped result. Will be set when skipped_results != 0.

bytes skipped_cursor = 3;

Returns
Type Description
ByteString

The skippedCursor.

getSkippedResults()

publicintgetSkippedResults()

The number of results skipped, typically because of an offset.

int32 skipped_results = 6;

Returns
Type Description
int

The skippedResults.

getSnapshotVersion()

publiclonggetSnapshotVersion()

The version number of the snapshot this batch was returned from. This applies to the range of results from the query's start_cursor (or the beginning of the query if no cursor was given) to this batch's end_cursor (not the query's end_cursor).

In a single transaction, subsequent query result batches for the same query can have a greater snapshot version number. Each batch's snapshot version is valid for all preceding batches. The value will be zero for eventually consistent queries.

int64 snapshot_version = 7;

Returns
Type Description
long

The snapshotVersion.

hasReadTime()

publicbooleanhasReadTime()

Read timestamp this batch was returned from. This applies to the range of results from the query's start_cursor (or the beginning of the query if no cursor was given) to this batch's end_cursor (not the query's end_cursor).

In a single transaction, subsequent query result batches for the same query can have a greater timestamp. Each batch's read timestamp is valid for all preceding batches. This value will not be set for eventually consistent queries in Cloud Datastore.

.google.protobuf.Timestamp read_time = 8;

Returns
Type Description
boolean

Whether the readTime field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(QueryResultBatch other)

publicQueryResultBatch.BuildermergeFrom(QueryResultBatchother)
Parameter
Name Description
other QueryResultBatch
Returns
Type Description
QueryResultBatch.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

publicQueryResultBatch.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
QueryResultBatch.Builder
Overrides

mergeReadTime(Timestamp value)

publicQueryResultBatch.BuildermergeReadTime(Timestampvalue)

Read timestamp this batch was returned from. This applies to the range of results from the query's start_cursor (or the beginning of the query if no cursor was given) to this batch's end_cursor (not the query's end_cursor).

In a single transaction, subsequent query result batches for the same query can have a greater timestamp. Each batch's read timestamp is valid for all preceding batches. This value will not be set for eventually consistent queries in Cloud Datastore.

.google.protobuf.Timestamp read_time = 8;

Parameter
Name Description
value Timestamp
Returns
Type Description
QueryResultBatch.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalQueryResultBatch.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
QueryResultBatch.Builder
Overrides

removeEntityResults(int index)

publicQueryResultBatch.BuilderremoveEntityResults(intindex)

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Parameter
Name Description
index int
Returns
Type Description
QueryResultBatch.Builder

setEndCursor(ByteString value)

publicQueryResultBatch.BuildersetEndCursor(ByteStringvalue)

A cursor that points to the position after the last result in the batch.

bytes end_cursor = 4;

Parameter
Name Description
value ByteString

The endCursor to set.

Returns
Type Description
QueryResultBatch.Builder

This builder for chaining.

setEntityResultType(EntityResult.ResultType value)

publicQueryResultBatch.BuildersetEntityResultType(EntityResult.ResultTypevalue)

The result type for every entity in entity_results.

.google.datastore.v1.EntityResult.ResultType entity_result_type = 1;

Parameter
Name Description
value EntityResult.ResultType

The entityResultType to set.

Returns
Type Description
QueryResultBatch.Builder

This builder for chaining.

setEntityResultTypeValue(int value)

publicQueryResultBatch.BuildersetEntityResultTypeValue(intvalue)

The result type for every entity in entity_results.

.google.datastore.v1.EntityResult.ResultType entity_result_type = 1;

Parameter
Name Description
value int

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

Returns
Type Description
QueryResultBatch.Builder

This builder for chaining.

setEntityResults(int index, EntityResult value)

publicQueryResultBatch.BuildersetEntityResults(intindex,EntityResultvalue)

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Parameters
Name Description
index int
value EntityResult
Returns
Type Description
QueryResultBatch.Builder

setEntityResults(int index, EntityResult.Builder builderForValue)

publicQueryResultBatch.BuildersetEntityResults(intindex,EntityResult.BuilderbuilderForValue)

The results for this batch.

repeated .google.datastore.v1.EntityResult entity_results = 2;

Parameters
Name Description
index int
builderForValue EntityResult.Builder
Returns
Type Description
QueryResultBatch.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setMoreResults(QueryResultBatch.MoreResultsType value)

publicQueryResultBatch.BuildersetMoreResults(QueryResultBatch.MoreResultsTypevalue)

The state of the query after the current batch.

.google.datastore.v1.QueryResultBatch.MoreResultsType more_results = 5;

Parameter
Name Description
value QueryResultBatch.MoreResultsType

The moreResults to set.

Returns
Type Description
QueryResultBatch.Builder

This builder for chaining.

setMoreResultsValue(int value)

publicQueryResultBatch.BuildersetMoreResultsValue(intvalue)

The state of the query after the current batch.

.google.datastore.v1.QueryResultBatch.MoreResultsType more_results = 5;

Parameter
Name Description
value int

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

Returns
Type Description
QueryResultBatch.Builder

This builder for chaining.

setReadTime(Timestamp value)

publicQueryResultBatch.BuildersetReadTime(Timestampvalue)

Read timestamp this batch was returned from. This applies to the range of results from the query's start_cursor (or the beginning of the query if no cursor was given) to this batch's end_cursor (not the query's end_cursor).

In a single transaction, subsequent query result batches for the same query can have a greater timestamp. Each batch's read timestamp is valid for all preceding batches. This value will not be set for eventually consistent queries in Cloud Datastore.

.google.protobuf.Timestamp read_time = 8;

Parameter
Name Description
value Timestamp
Returns
Type Description
QueryResultBatch.Builder

setReadTime(Timestamp.Builder builderForValue)

publicQueryResultBatch.BuildersetReadTime(Timestamp.BuilderbuilderForValue)

Read timestamp this batch was returned from. This applies to the range of results from the query's start_cursor (or the beginning of the query if no cursor was given) to this batch's end_cursor (not the query's end_cursor).

In a single transaction, subsequent query result batches for the same query can have a greater timestamp. Each batch's read timestamp is valid for all preceding batches. This value will not be set for eventually consistent queries in Cloud Datastore.

.google.protobuf.Timestamp read_time = 8;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
QueryResultBatch.Builder

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

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

setSkippedCursor(ByteString value)

publicQueryResultBatch.BuildersetSkippedCursor(ByteStringvalue)

A cursor that points to the position after the last skipped result. Will be set when skipped_results != 0.

bytes skipped_cursor = 3;

Parameter
Name Description
value ByteString

The skippedCursor to set.

Returns
Type Description
QueryResultBatch.Builder

This builder for chaining.

setSkippedResults(int value)

publicQueryResultBatch.BuildersetSkippedResults(intvalue)

The number of results skipped, typically because of an offset.

int32 skipped_results = 6;

Parameter
Name Description
value int

The skippedResults to set.

Returns
Type Description
QueryResultBatch.Builder

This builder for chaining.

setSnapshotVersion(long value)

publicQueryResultBatch.BuildersetSnapshotVersion(longvalue)

The version number of the snapshot this batch was returned from. This applies to the range of results from the query's start_cursor (or the beginning of the query if no cursor was given) to this batch's end_cursor (not the query's end_cursor).

In a single transaction, subsequent query result batches for the same query can have a greater snapshot version number. Each batch's snapshot version is valid for all preceding batches. The value will be zero for eventually consistent queries.

int64 snapshot_version = 7;

Parameter
Name Description
value long

The snapshotVersion to set.

Returns
Type Description
QueryResultBatch.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalQueryResultBatch.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
QueryResultBatch.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.