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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
    • clear

      public QueryResultBatch.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
    • getDefaultInstanceForType

      public QueryResultBatch getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public QueryResultBatch build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public QueryResultBatch buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public QueryResultBatch.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
    • setField

      public QueryResultBatch.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
    • clearField

      public QueryResultBatch.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
    • clearOneof

      public QueryResultBatch.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.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 interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
    • addRepeatedField

      public QueryResultBatch.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
    • mergeFrom

      public QueryResultBatch.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<QueryResultBatch.Builder>
    • mergeFrom

      public QueryResultBatch.Builder mergeFrom(QueryResultBatch other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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 interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.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 interface QueryResultBatchOrBuilder
      Returns:
      The skippedResults.
    • setSkippedResults

      public QueryResultBatch.Builder setSkippedResults(int value)
       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

      public QueryResultBatch.Builder 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 interface QueryResultBatchOrBuilder
      Returns:
      The skippedCursor.
    • setSkippedCursor

      public QueryResultBatch.Builder setSkippedCursor(com.google.protobuf.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;
      Parameters:
      value - The skippedCursor to set.
      Returns:
      This builder for chaining.
    • 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:
      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 interface QueryResultBatchOrBuilder
      Returns:
      The enum numeric value on the wire for entityResultType.
    • setEntityResultTypeValue

      public QueryResultBatch.Builder setEntityResultTypeValue(int value)
       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

      public EntityResult.ResultType getEntityResultType()
       The result type for every entity in `entity_results`.
       
      .google.datastore.v1.EntityResult.ResultType entity_result_type = 1;
      Specified by:
      getEntityResultType in interface QueryResultBatchOrBuilder
      Returns:
      The entityResultType.
    • setEntityResultType

      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;
      Parameters:
      value - The entityResultType to set.
      Returns:
      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:
      This builder for chaining.
    • getEntityResultsList

      public List<EntityResult> getEntityResultsList()
       The results for this batch.
       
      repeated .google.datastore.v1.EntityResult entity_results = 2;
      Specified by:
      getEntityResultsList in interface QueryResultBatchOrBuilder
    • getEntityResultsCount

      public int getEntityResultsCount()
       The results for this batch.
       
      repeated .google.datastore.v1.EntityResult entity_results = 2;
      Specified by:
      getEntityResultsCount in interface QueryResultBatchOrBuilder
    • getEntityResults

      public EntityResult getEntityResults(int index)
       The results for this batch.
       
      repeated .google.datastore.v1.EntityResult entity_results = 2;
      Specified by:
      getEntityResults in interface QueryResultBatchOrBuilder
    • setEntityResults

      public QueryResultBatch.Builder setEntityResults(int index, EntityResult value)
       The results for this batch.
       
      repeated .google.datastore.v1.EntityResult entity_results = 2;
    • setEntityResults

      public QueryResultBatch.Builder setEntityResults(int index, EntityResult.Builder builderForValue)
       The results for this batch.
       
      repeated .google.datastore.v1.EntityResult entity_results = 2;
    • addEntityResults

      public QueryResultBatch.Builder addEntityResults(EntityResult value)
       The results for this batch.
       
      repeated .google.datastore.v1.EntityResult entity_results = 2;
    • addEntityResults

      public QueryResultBatch.Builder addEntityResults(int index, EntityResult value)
       The results for this batch.
       
      repeated .google.datastore.v1.EntityResult entity_results = 2;
    • addEntityResults

      public QueryResultBatch.Builder addEntityResults(EntityResult.Builder builderForValue)
       The results for this batch.
       
      repeated .google.datastore.v1.EntityResult entity_results = 2;
    • addEntityResults

      public QueryResultBatch.Builder addEntityResults(int index, EntityResult.Builder builderForValue)
       The results for this batch.
       
      repeated .google.datastore.v1.EntityResult entity_results = 2;
    • addAllEntityResults

      public QueryResultBatch.Builder addAllEntityResults(Iterable<? extends EntityResult> values)
       The results for this batch.
       
      repeated .google.datastore.v1.EntityResult entity_results = 2;
    • clearEntityResults

      public QueryResultBatch.Builder clearEntityResults()
       The results for this batch.
       
      repeated .google.datastore.v1.EntityResult entity_results = 2;
    • removeEntityResults

      public QueryResultBatch.Builder removeEntityResults(int index)
       The results for this batch.
       
      repeated .google.datastore.v1.EntityResult entity_results = 2;
    • getEntityResultsBuilder

      public EntityResult.Builder getEntityResultsBuilder(int index)
       The results for this batch.
       
      repeated .google.datastore.v1.EntityResult entity_results = 2;
    • getEntityResultsOrBuilder

      public EntityResultOrBuilder getEntityResultsOrBuilder(int index)
       The results for this batch.
       
      repeated .google.datastore.v1.EntityResult entity_results = 2;
      Specified by:
      getEntityResultsOrBuilder in interface QueryResultBatchOrBuilder
    • getEntityResultsOrBuilderList

      public List<? extends EntityResultOrBuilder> getEntityResultsOrBuilderList()
       The results for this batch.
       
      repeated .google.datastore.v1.EntityResult entity_results = 2;
      Specified by:
      getEntityResultsOrBuilderList in interface QueryResultBatchOrBuilder
    • addEntityResultsBuilder

      public EntityResult.Builder addEntityResultsBuilder()
       The results for this batch.
       
      repeated .google.datastore.v1.EntityResult entity_results = 2;
    • addEntityResultsBuilder

      public EntityResult.Builder addEntityResultsBuilder(int index)
       The results for this batch.
       
      repeated .google.datastore.v1.EntityResult entity_results = 2;
    • getEntityResultsBuilderList

      public List<EntityResult.Builder> 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 interface QueryResultBatchOrBuilder
      Returns:
      The endCursor.
    • setEndCursor

      public QueryResultBatch.Builder setEndCursor(com.google.protobuf.ByteString value)
       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

      public QueryResultBatch.Builder 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 interface QueryResultBatchOrBuilder
      Returns:
      The enum numeric value on the wire for moreResults.
    • setMoreResultsValue

      public QueryResultBatch.Builder setMoreResultsValue(int value)
       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

      public QueryResultBatch.MoreResultsType getMoreResults()
       The state of the query after the current batch.
       
      .google.datastore.v1.QueryResultBatch.MoreResultsType more_results = 5;
      Specified by:
      getMoreResults in interface QueryResultBatchOrBuilder
      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

      public QueryResultBatch.Builder 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 interface QueryResultBatchOrBuilder
      Returns:
      The snapshotVersion.
    • setSnapshotVersion

      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;
      Parameters:
      value - The snapshotVersion to set.
      Returns:
      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:
      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 interface QueryResultBatchOrBuilder
      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 interface QueryResultBatchOrBuilder
      Returns:
      The readTime.
    • setReadTime

      public QueryResultBatch.Builder setReadTime(com.google.protobuf.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;
    • setReadTime

      public QueryResultBatch.Builder setReadTime(com.google.protobuf.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;
    • mergeReadTime

      public QueryResultBatch.Builder mergeReadTime(com.google.protobuf.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;
    • 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;
    • 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 interface QueryResultBatchOrBuilder
    • setUnknownFields

      public final QueryResultBatch.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>
    • mergeUnknownFields

      public final QueryResultBatch.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<QueryResultBatch.Builder>