Class KeySet.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<KeySet.Builder>
com.google.spanner.v1.KeySet.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, KeySetOrBuilder, Cloneable
Enclosing class:
KeySet

public static final class KeySet.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<KeySet.Builder> implements KeySetOrBuilder
 `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All
 the keys are expected to be in the same table or index. The keys need
 not be sorted in any particular way.

 If the same key is specified multiple times in the set (for example
 if two ranges, two keys, or a key and a range overlap), Cloud Spanner
 behaves as if the key were only specified once.
 
Protobuf type google.spanner.v1.KeySet
  • 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<KeySet.Builder>
    • clear

      public KeySet.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<KeySet.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<KeySet.Builder>
    • getDefaultInstanceForType

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

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

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

      public KeySet.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<KeySet.Builder>
    • setField

      public KeySet.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<KeySet.Builder>
    • clearField

      public KeySet.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<KeySet.Builder>
    • clearOneof

      public KeySet.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<KeySet.Builder>
    • setRepeatedField

      public KeySet.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<KeySet.Builder>
    • addRepeatedField

      public KeySet.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<KeySet.Builder>
    • mergeFrom

      public KeySet.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<KeySet.Builder>
    • mergeFrom

      public KeySet.Builder mergeFrom(KeySet other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<KeySet.Builder>
    • mergeFrom

      public KeySet.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<KeySet.Builder>
      Throws:
      IOException
    • getKeysList

      public List<com.google.protobuf.ListValue> getKeysList()
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
      Specified by:
      getKeysList in interface KeySetOrBuilder
    • getKeysCount

      public int getKeysCount()
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
      Specified by:
      getKeysCount in interface KeySetOrBuilder
    • getKeys

      public com.google.protobuf.ListValue getKeys(int index)
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
      Specified by:
      getKeys in interface KeySetOrBuilder
    • setKeys

      public KeySet.Builder setKeys(int index, com.google.protobuf.ListValue value)
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
    • setKeys

      public KeySet.Builder setKeys(int index, com.google.protobuf.ListValue.Builder builderForValue)
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
    • addKeys

      public KeySet.Builder addKeys(com.google.protobuf.ListValue value)
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
    • addKeys

      public KeySet.Builder addKeys(int index, com.google.protobuf.ListValue value)
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
    • addKeys

      public KeySet.Builder addKeys(com.google.protobuf.ListValue.Builder builderForValue)
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
    • addKeys

      public KeySet.Builder addKeys(int index, com.google.protobuf.ListValue.Builder builderForValue)
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
    • addAllKeys

      public KeySet.Builder addAllKeys(Iterable<? extends com.google.protobuf.ListValue> values)
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
    • clearKeys

      public KeySet.Builder clearKeys()
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
    • removeKeys

      public KeySet.Builder removeKeys(int index)
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
    • getKeysBuilder

      public com.google.protobuf.ListValue.Builder getKeysBuilder(int index)
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
    • getKeysOrBuilder

      public com.google.protobuf.ListValueOrBuilder getKeysOrBuilder(int index)
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
      Specified by:
      getKeysOrBuilder in interface KeySetOrBuilder
    • getKeysOrBuilderList

      public List<? extends com.google.protobuf.ListValueOrBuilder> getKeysOrBuilderList()
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
      Specified by:
      getKeysOrBuilderList in interface KeySetOrBuilder
    • addKeysBuilder

      public com.google.protobuf.ListValue.Builder addKeysBuilder()
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
    • addKeysBuilder

      public com.google.protobuf.ListValue.Builder addKeysBuilder(int index)
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
    • getKeysBuilderList

      public List<com.google.protobuf.ListValue.Builder> getKeysBuilderList()
       A list of specific keys. Entries in `keys` should have exactly as
       many elements as there are columns in the primary or index key
       with which this `KeySet` is used.  Individual key values are
       encoded as described [here][google.spanner.v1.TypeCode].
       
      repeated .google.protobuf.ListValue keys = 1;
    • getRangesList

      public List<KeyRange> getRangesList()
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
      Specified by:
      getRangesList in interface KeySetOrBuilder
    • getRangesCount

      public int getRangesCount()
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
      Specified by:
      getRangesCount in interface KeySetOrBuilder
    • getRanges

      public KeyRange getRanges(int index)
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
      Specified by:
      getRanges in interface KeySetOrBuilder
    • setRanges

      public KeySet.Builder setRanges(int index, KeyRange value)
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
    • setRanges

      public KeySet.Builder setRanges(int index, KeyRange.Builder builderForValue)
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
    • addRanges

      public KeySet.Builder addRanges(KeyRange value)
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
    • addRanges

      public KeySet.Builder addRanges(int index, KeyRange value)
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
    • addRanges

      public KeySet.Builder addRanges(KeyRange.Builder builderForValue)
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
    • addRanges

      public KeySet.Builder addRanges(int index, KeyRange.Builder builderForValue)
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
    • addAllRanges

      public KeySet.Builder addAllRanges(Iterable<? extends KeyRange> values)
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
    • clearRanges

      public KeySet.Builder clearRanges()
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
    • removeRanges

      public KeySet.Builder removeRanges(int index)
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
    • getRangesBuilder

      public KeyRange.Builder getRangesBuilder(int index)
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
    • getRangesOrBuilder

      public KeyRangeOrBuilder getRangesOrBuilder(int index)
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
      Specified by:
      getRangesOrBuilder in interface KeySetOrBuilder
    • getRangesOrBuilderList

      public List<? extends KeyRangeOrBuilder> getRangesOrBuilderList()
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
      Specified by:
      getRangesOrBuilderList in interface KeySetOrBuilder
    • addRangesBuilder

      public KeyRange.Builder addRangesBuilder()
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
    • addRangesBuilder

      public KeyRange.Builder addRangesBuilder(int index)
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
    • getRangesBuilderList

      public List<KeyRange.Builder> getRangesBuilderList()
       A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
       key range specifications.
       
      repeated .google.spanner.v1.KeyRange ranges = 2;
    • getAll

      public boolean getAll()
       For convenience `all` can be set to `true` to indicate that this
       `KeySet` matches all keys in the table or index. Note that any keys
       specified in `keys` or `ranges` are only yielded once.
       
      bool all = 3;
      Specified by:
      getAll in interface KeySetOrBuilder
      Returns:
      The all.
    • setAll

      public KeySet.Builder setAll(boolean value)
       For convenience `all` can be set to `true` to indicate that this
       `KeySet` matches all keys in the table or index. Note that any keys
       specified in `keys` or `ranges` are only yielded once.
       
      bool all = 3;
      Parameters:
      value - The all to set.
      Returns:
      This builder for chaining.
    • clearAll

      public KeySet.Builder clearAll()
       For convenience `all` can be set to `true` to indicate that this
       `KeySet` matches all keys in the table or index. Note that any keys
       specified in `keys` or `ranges` are only yielded once.
       
      bool all = 3;
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final KeySet.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<KeySet.Builder>
    • mergeUnknownFields

      public final KeySet.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<KeySet.Builder>