Class QueryResultBatch.Builder (2.19.0)

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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.datastore.v1.EntityResult>
Returns
TypeDescription
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
NameDescription
valueEntityResult
Returns
TypeDescription
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
NameDescription
builderForValueEntityResult.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueEntityResult
Returns
TypeDescription
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
NameDescription
indexint
builderForValueEntityResult.Builder
Returns
TypeDescription
QueryResultBatch.Builder

addEntityResultsBuilder()

public EntityResult.Builder addEntityResultsBuilder()

The results for this batch.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
EntityResult.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public QueryResultBatch build()
Returns
TypeDescription
QueryResultBatch

buildPartial()

public QueryResultBatch buildPartial()
Returns
TypeDescription
QueryResultBatch

clear()

public QueryResultBatch.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
QueryResultBatch.Builder

clearField(Descriptors.FieldDescriptor field)

public QueryResultBatch.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
QueryResultBatch.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public QueryResultBatch.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
QueryResultBatch.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public QueryResultBatch getDefaultInstanceForType()
Returns
TypeDescription
QueryResultBatch

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
EntityResult

getEntityResultsBuilder(int index)

public EntityResult.Builder getEntityResultsBuilder(int index)

The results for this batch.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
EntityResult.Builder

getEntityResultsBuilderList()

public List<EntityResult.Builder> getEntityResultsBuilderList()

The results for this batch.

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

Returns
TypeDescription
List<Builder>

getEntityResultsCount()

public int getEntityResultsCount()

The results for this batch.

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

Returns
TypeDescription
int

getEntityResultsList()

public List<EntityResult> getEntityResultsList()

The results for this batch.

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

Returns
TypeDescription
List<EntityResult>

getEntityResultsOrBuilder(int index)

public EntityResultOrBuilder getEntityResultsOrBuilder(int index)

The results for this batch.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
EntityResultOrBuilder

getEntityResultsOrBuilderList()

public List<? extends EntityResultOrBuilder> getEntityResultsOrBuilderList()

The results for this batch.

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

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

The skippedCursor.

getSkippedResults()

public int getSkippedResults()

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

int32 skipped_results = 6;

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

Whether the readTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(QueryResultBatch other)

public QueryResultBatch.Builder mergeFrom(QueryResultBatch other)
Parameter
NameDescription
otherQueryResultBatch
Returns
TypeDescription
QueryResultBatch.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public QueryResultBatch.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
QueryResultBatch.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final QueryResultBatch.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueByteString

The endCursor to set.

Returns
TypeDescription
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
NameDescription
valueEntityResult.ResultType

The entityResultType to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
indexint
valueEntityResult
Returns
TypeDescription
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
NameDescription
indexint
builderForValueEntityResult.Builder
Returns
TypeDescription
QueryResultBatch.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public QueryResultBatch.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueQueryResultBatch.MoreResultsType

The moreResults to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
QueryResultBatch.Builder

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

public QueryResultBatch.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueByteString

The skippedCursor to set.

Returns
TypeDescription
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
NameDescription
valueint

The skippedResults to set.

Returns
TypeDescription
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
NameDescription
valuelong

The snapshotVersion to set.

Returns
TypeDescription
QueryResultBatch.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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