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.Descriptorcom.google.protobuf.Descriptors.Descriptorcom.google.protobuf.ByteStringA 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.intThe 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`.intThe result type for every entity in `entity_results`.The state of the query after the current batch.intThe state of the query after the current batch.com.google.protobuf.TimestampRead timestamp this batch was returned from.com.google.protobuf.Timestamp.BuilderRead timestamp this batch was returned from.com.google.protobuf.TimestampOrBuilderRead timestamp this batch was returned from.com.google.protobuf.ByteStringA cursor that points to the position after the last skipped result.intThe number of results skipped, typically because of an offset.longThe version number of the snapshot this batch was returned from.booleanRead timestamp this batch was returned from.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(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.BuildermergeUnknownFields(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.BuildersetUnknownFields(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, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods 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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
setField
public QueryResultBatch.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
setRepeatedField
public QueryResultBatch.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
addRepeatedField
public QueryResultBatch.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<QueryResultBatch.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin 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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin 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:
getSkippedResultsin 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:
getSkippedCursorin 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:
getEntityResultTypeValuein 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:
getEntityResultTypein 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:
getEntityResultsListin interfaceQueryResultBatchOrBuilder
-
getEntityResultsCount
public int getEntityResultsCount()The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;- Specified by:
getEntityResultsCountin interfaceQueryResultBatchOrBuilder
-
getEntityResults
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;- Specified by:
getEntityResultsin 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:
getEntityResultsOrBuilderin interfaceQueryResultBatchOrBuilder
-
getEntityResultsOrBuilderList
The results for this batch.
repeated .google.datastore.v1.EntityResult entity_results = 2;- Specified by:
getEntityResultsOrBuilderListin 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:
getEndCursorin 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:
getMoreResultsValuein 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:
getMoreResultsin 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:
getSnapshotVersionin 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:
hasReadTimein 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:
getReadTimein 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:
getReadTimeOrBuilderin interfaceQueryResultBatchOrBuilder
-
setUnknownFields
public final QueryResultBatch.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-
mergeUnknownFields
public final QueryResultBatch.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
-