Class QueryResultBatch.Builder (2.19.2)

public static final class QueryResultBatch.Builder extends GeneratedMessageV3.Builder<QueryResultBatch.Builder> implements QueryResultBatchOrBuilder

A batch of results produced by a query.

Protobuf type google.datastore.v1.QueryResultBatch

Static Methods

getDescriptor()

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

Methods

addAllEntityResults(Iterable<? extends EntityResult> values)

public QueryResultBatch.Builder addAllEntityResults(Iterable<? extends EntityResult> 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)

public QueryResultBatch.Builder addEntityResults(EntityResult value)

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)

public QueryResultBatch.Builder addEntityResults(EntityResult.Builder builderForValue)

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)

public QueryResultBatch.Builder addEntityResults(int index, EntityResult value)

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)

public QueryResultBatch.Builder addEntityResults(int index, EntityResult.Builder builderForValue)

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()

public EntityResult.Builder addEntityResultsBuilder()

The results for this batch.

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

Returns
Type Description
EntityResult.Builder

addEntityResultsBuilder(int index)

public EntityResult.Builder addEntityResultsBuilder(int index)

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)

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

build()

public QueryResultBatch build()
Returns
Type Description
QueryResultBatch

buildPartial()

public QueryResultBatch buildPartial()
Returns
Type Description
QueryResultBatch

clear()

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

clearEndCursor()

public QueryResultBatch.Builder clearEndCursor()

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()

public QueryResultBatch.Builder clearEntityResultType()

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()

public QueryResultBatch.Builder clearEntityResults()

The results for this batch.

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

Returns
Type Description
QueryResultBatch.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearMoreResults()

public QueryResultBatch.Builder clearMoreResults()

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)

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

clearReadTime()

public QueryResultBatch.Builder clearReadTime()

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()

public QueryResultBatch.Builder clearSkippedCursor()

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()

public QueryResultBatch.Builder clearSkippedResults()

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

int32 skipped_results = 6;

Returns
Type Description
QueryResultBatch.Builder

This builder for chaining.

clearSnapshotVersion()

public QueryResultBatch.Builder clearSnapshotVersion()

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()

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

getDefaultInstanceForType()

public QueryResultBatch getDefaultInstanceForType()
Returns
Type Description
QueryResultBatch

getDescriptorForType()

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

getEndCursor()

public ByteString getEndCursor()

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()

public EntityResult.ResultType getEntityResultType()

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()

public int getEntityResultTypeValue()

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)

public EntityResult getEntityResults(int index)

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)

public EntityResult.Builder getEntityResultsBuilder(int index)

The results for this batch.

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

Parameter
Name Description
index int
Returns
Type Description
EntityResult.Builder

getEntityResultsBuilderList()

public List<EntityResult.Builder> getEntityResultsBuilderList()

The results for this batch.

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

Returns
Type Description
List<Builder>

getEntityResultsCount()

public int getEntityResultsCount()

The results for this batch.

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

Returns
Type Description
int

getEntityResultsList()

public List<EntityResult> getEntityResultsList()

The results for this batch.

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

Returns
Type Description
List<EntityResult>

getEntityResultsOrBuilder(int index)

public EntityResultOrBuilder getEntityResultsOrBuilder(int index)

The results for this batch.

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

Parameter
Name Description
index int
Returns
Type Description
EntityResultOrBuilder

getEntityResultsOrBuilderList()

public List<? extends EntityResultOrBuilder> 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()

public QueryResultBatch.MoreResultsType getMoreResults()

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()

public int getMoreResultsValue()

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()

public Timestamp getReadTime()

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()

public Timestamp.Builder getReadTimeBuilder()

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()

public TimestampOrBuilder getReadTimeOrBuilder()

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()

public ByteString getSkippedCursor()

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()

public int getSkippedResults()

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

int32 skipped_results = 6;

Returns
Type Description
int

The skippedResults.

getSnapshotVersion()

public long getSnapshotVersion()

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()

public boolean hasReadTime()

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()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(QueryResultBatch other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeReadTime(Timestamp value)

public QueryResultBatch.Builder mergeReadTime(Timestamp value)

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)

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

removeEntityResults(int index)

public QueryResultBatch.Builder removeEntityResults(int index)

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)

public QueryResultBatch.Builder setEndCursor(ByteString value)

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)

public QueryResultBatch.Builder setEntityResultType(EntityResult.ResultType value)

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)

public QueryResultBatch.Builder setEntityResultTypeValue(int value)

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)

public QueryResultBatch.Builder setEntityResults(int index, EntityResult value)

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)

public QueryResultBatch.Builder setEntityResults(int index, EntityResult.Builder builderForValue)

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)

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

setMoreResults(QueryResultBatch.MoreResultsType value)

public QueryResultBatch.Builder setMoreResults(QueryResultBatch.MoreResultsType value)

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)

public QueryResultBatch.Builder setMoreResultsValue(int value)

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)

public QueryResultBatch.Builder setReadTime(Timestamp value)

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)

public QueryResultBatch.Builder setReadTime(Timestamp.Builder builderForValue)

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)

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

setSkippedCursor(ByteString value)

public QueryResultBatch.Builder setSkippedCursor(ByteString value)

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)

public QueryResultBatch.Builder setSkippedResults(int value)

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)

public QueryResultBatch.Builder setSnapshotVersion(long value)

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)

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