Package com.google.datastore.v1
Class QueryResultBatch.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
com.google.datastore.v1.QueryResultBatch.Builder
- All Implemented Interfaces:
QueryResultBatchOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- QueryResultBatch
public static final class QueryResultBatch.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
implements QueryResultBatchOrBuilder
A batch of results produced by a query.Protobuf type
google.datastore.v1.QueryResultBatch
-
Method Summary
Modifier and TypeMethodDescriptionaddAllEntityResults
(Iterable<? extends EntityResult> values) The results for this batch.addEntityResults
(int index, EntityResult value) The results for this batch.addEntityResults
(int index, EntityResult.Builder builderForValue) The results for this batch.addEntityResults
(EntityResult value) The results for this batch.addEntityResults
(EntityResult.Builder builderForValue) The results for this batch.The results for this batch.addEntityResultsBuilder
(int index) The results for this batch.addRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()
clear()
A cursor that points to the position after the last result in the batch.The results for this batch.The result type for every entity in `entity_results`.clearField
(com.google.protobuf.Descriptors.FieldDescriptor field) The state of the query after the current batch.clearOneof
(com.google.protobuf.Descriptors.OneofDescriptor oneof) Read timestamp this batch was returned from.A cursor that points to the position after the last skipped result.The number of results skipped, typically because of an offset.The version number of the snapshot this batch was returned from.clone()
static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.ByteString
A cursor that points to the position after the last result in the batch.getEntityResults
(int index) The results for this batch.getEntityResultsBuilder
(int index) The results for this batch.The results for this batch.int
The results for this batch.The results for this batch.getEntityResultsOrBuilder
(int index) The results for this batch.List<? extends EntityResultOrBuilder>
The results for this batch.The result type for every entity in `entity_results`.int
The result type for every entity in `entity_results`.The state of the query after the current batch.int
The state of the query after the current batch.com.google.protobuf.Timestamp
Read timestamp this batch was returned from.com.google.protobuf.Timestamp.Builder
Read timestamp this batch was returned from.com.google.protobuf.TimestampOrBuilder
Read timestamp this batch was returned from.com.google.protobuf.ByteString
A cursor that points to the position after the last skipped result.int
The number of results skipped, typically because of an offset.long
The version number of the snapshot this batch was returned from.boolean
Read timestamp this batch was returned from.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
final boolean
mergeFrom
(QueryResultBatch other) mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeReadTime
(com.google.protobuf.Timestamp value) Read timestamp this batch was returned from.final QueryResultBatch.Builder
mergeUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) removeEntityResults
(int index) The results for this batch.setEndCursor
(com.google.protobuf.ByteString value) A cursor that points to the position after the last result in the batch.setEntityResults
(int index, EntityResult value) The results for this batch.setEntityResults
(int index, EntityResult.Builder builderForValue) The results for this batch.The result type for every entity in `entity_results`.setEntityResultTypeValue
(int value) The result type for every entity in `entity_results`.The state of the query after the current batch.setMoreResultsValue
(int value) The state of the query after the current batch.setReadTime
(com.google.protobuf.Timestamp value) Read timestamp this batch was returned from.setReadTime
(com.google.protobuf.Timestamp.Builder builderForValue) Read timestamp this batch was returned from.setRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setSkippedCursor
(com.google.protobuf.ByteString value) A cursor that points to the position after the last skipped result.setSkippedResults
(int value) The number of results skipped, typically because of an offset.setSnapshotVersion
(long value) The version number of the snapshot this batch was returned from.final QueryResultBatch.Builder
setUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
setField
public QueryResultBatch.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
clearField
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
clearOneof
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
setRepeatedField
public QueryResultBatch.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
addRepeatedField
public QueryResultBatch.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<QueryResultBatch.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
mergeFrom
public QueryResultBatch.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<QueryResultBatch.Builder>
- Throws:
IOException
-
getSkippedResults
public int getSkippedResults()The number of results skipped, typically because of an offset.
int32 skipped_results = 6;
- Specified by:
getSkippedResults
in interfaceQueryResultBatchOrBuilder
- Returns:
- The skippedResults.
-
setSkippedResults
The number of results skipped, typically because of an offset.
int32 skipped_results = 6;
- Parameters:
value
- The skippedResults to set.- Returns:
- This builder for chaining.
-
clearSkippedResults
The number of results skipped, typically because of an offset.
int32 skipped_results = 6;
- Returns:
- This builder for chaining.
-
getSkippedCursor
public com.google.protobuf.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;
- Specified by:
getSkippedCursor
in interfaceQueryResultBatchOrBuilder
- Returns:
- The skippedCursor.
-
setSkippedCursor
A cursor that points to the position after the last skipped result. Will be set when `skipped_results` != 0.
bytes skipped_cursor = 3;
- Parameters:
value
- The skippedCursor to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
getEntityResultTypeValue
public int getEntityResultTypeValue()The result type for every entity in `entity_results`.
.google.datastore.v1.EntityResult.ResultType entity_result_type = 1;
- Specified by:
getEntityResultTypeValue
in interfaceQueryResultBatchOrBuilder
- Returns:
- The enum numeric value on the wire for entityResultType.
-
setEntityResultTypeValue
The result type for every entity in `entity_results`.
.google.datastore.v1.EntityResult.ResultType entity_result_type = 1;
- Parameters:
value
- The enum numeric value on the wire for entityResultType to set.- Returns:
- This builder for chaining.
-
getEntityResultType
The result type for every entity in `entity_results`.
.google.datastore.v1.EntityResult.ResultType entity_result_type = 1;
- Specified by:
getEntityResultType
in interfaceQueryResultBatchOrBuilder
- Returns:
- The entityResultType.
-
setEntityResultType
The result type for every entity in `entity_results`.
.google.datastore.v1.EntityResult.ResultType entity_result_type = 1;
- Parameters:
value
- The entityResultType to set.- Returns:
- This builder for chaining.
-
clearEntityResultType
The result type for every entity in `entity_results`.
.google.datastore.v1.EntityResult.ResultType entity_result_type = 1;
- Returns:
- This builder for chaining.
-
getEntityResultsList
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
- Specified by:
getEntityResultsList
in interfaceQueryResultBatchOrBuilder
-
getEntityResultsCount
public int getEntityResultsCount()The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
- Specified by:
getEntityResultsCount
in interfaceQueryResultBatchOrBuilder
-
getEntityResults
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
- Specified by:
getEntityResults
in interfaceQueryResultBatchOrBuilder
-
setEntityResults
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
-
setEntityResults
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
-
addEntityResults
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
-
addEntityResults
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
-
addEntityResults
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
-
addEntityResults
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
-
addAllEntityResults
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
-
clearEntityResults
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
-
removeEntityResults
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
-
getEntityResultsBuilder
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
-
getEntityResultsOrBuilder
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
- Specified by:
getEntityResultsOrBuilder
in interfaceQueryResultBatchOrBuilder
-
getEntityResultsOrBuilderList
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
- Specified by:
getEntityResultsOrBuilderList
in interfaceQueryResultBatchOrBuilder
-
addEntityResultsBuilder
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
-
addEntityResultsBuilder
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
-
getEntityResultsBuilderList
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;
-
getEndCursor
public com.google.protobuf.ByteString getEndCursor()A cursor that points to the position after the last result in the batch.
bytes end_cursor = 4;
- Specified by:
getEndCursor
in interfaceQueryResultBatchOrBuilder
- Returns:
- The endCursor.
-
setEndCursor
A cursor that points to the position after the last result in the batch.
bytes end_cursor = 4;
- Parameters:
value
- The endCursor to set.- Returns:
- This builder for chaining.
-
clearEndCursor
A cursor that points to the position after the last result in the batch.
bytes end_cursor = 4;
- Returns:
- This builder for chaining.
-
getMoreResultsValue
public int getMoreResultsValue()The state of the query after the current batch.
.google.datastore.v1.QueryResultBatch.MoreResultsType more_results = 5;
- Specified by:
getMoreResultsValue
in interfaceQueryResultBatchOrBuilder
- Returns:
- The enum numeric value on the wire for moreResults.
-
setMoreResultsValue
The state of the query after the current batch.
.google.datastore.v1.QueryResultBatch.MoreResultsType more_results = 5;
- Parameters:
value
- The enum numeric value on the wire for moreResults to set.- Returns:
- This builder for chaining.
-
getMoreResults
The state of the query after the current batch.
.google.datastore.v1.QueryResultBatch.MoreResultsType more_results = 5;
- Specified by:
getMoreResults
in interfaceQueryResultBatchOrBuilder
- Returns:
- The moreResults.
-
setMoreResults
The state of the query after the current batch.
.google.datastore.v1.QueryResultBatch.MoreResultsType more_results = 5;
- Parameters:
value
- The moreResults to set.- Returns:
- This builder for chaining.
-
clearMoreResults
The state of the query after the current batch.
.google.datastore.v1.QueryResultBatch.MoreResultsType more_results = 5;
- Returns:
- This builder for chaining.
-
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;
- Specified by:
getSnapshotVersion
in interfaceQueryResultBatchOrBuilder
- Returns:
- The snapshotVersion.
-
setSnapshotVersion
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;
- Parameters:
value
- The snapshotVersion to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
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;
- Specified by:
hasReadTime
in interfaceQueryResultBatchOrBuilder
- Returns:
- Whether the readTime field is set.
-
getReadTime
public com.google.protobuf.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;
- Specified by:
getReadTime
in interfaceQueryResultBatchOrBuilder
- Returns:
- The readTime.
-
setReadTime
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;
-
setReadTime
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;
-
mergeReadTime
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;
-
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;
-
getReadTimeBuilder
public com.google.protobuf.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;
-
getReadTimeOrBuilder
public com.google.protobuf.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;
- Specified by:
getReadTimeOrBuilder
in interfaceQueryResultBatchOrBuilder
-
setUnknownFields
public final QueryResultBatch.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
mergeUnknownFields
public final QueryResultBatch.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-