Class KeySet.Builder (6.82.0)

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

Implements

KeySetOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllKeys(Iterable<? extends ListValue> values)

public KeySet.Builder addAllKeys(Iterable<? extends 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.

repeated .google.protobuf.ListValue keys = 1;

Parameter
Name Description
values Iterable<? extends com.google.protobuf.ListValue>
Returns
Type Description
KeySet.Builder

addAllRanges(Iterable<? extends KeyRange> values)

public KeySet.Builder addAllRanges(Iterable<? extends KeyRange> values)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameter
Name Description
values Iterable<? extends com.google.spanner.v1.KeyRange>
Returns
Type Description
KeySet.Builder

addKeys(ListValue value)

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

repeated .google.protobuf.ListValue keys = 1;

Parameter
Name Description
value ListValue
Returns
Type Description
KeySet.Builder

addKeys(ListValue.Builder builderForValue)

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

repeated .google.protobuf.ListValue keys = 1;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
KeySet.Builder

addKeys(int index, ListValue value)

public KeySet.Builder addKeys(int index, 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.

repeated .google.protobuf.ListValue keys = 1;

Parameters
Name Description
index int
value ListValue
Returns
Type Description
KeySet.Builder

addKeys(int index, ListValue.Builder builderForValue)

public KeySet.Builder addKeys(int index, 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.

repeated .google.protobuf.ListValue keys = 1;

Parameters
Name Description
index int
builderForValue Builder
Returns
Type Description
KeySet.Builder

addKeysBuilder()

public 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.

repeated .google.protobuf.ListValue keys = 1;

Returns
Type Description
Builder

addKeysBuilder(int index)

public 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.

repeated .google.protobuf.ListValue keys = 1;

Parameter
Name Description
index int
Returns
Type Description
Builder

addRanges(KeyRange value)

public KeySet.Builder addRanges(KeyRange value)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameter
Name Description
value KeyRange
Returns
Type Description
KeySet.Builder

addRanges(KeyRange.Builder builderForValue)

public KeySet.Builder addRanges(KeyRange.Builder builderForValue)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameter
Name Description
builderForValue KeyRange.Builder
Returns
Type Description
KeySet.Builder

addRanges(int index, KeyRange value)

public KeySet.Builder addRanges(int index, KeyRange value)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameters
Name Description
index int
value KeyRange
Returns
Type Description
KeySet.Builder

addRanges(int index, KeyRange.Builder builderForValue)

public KeySet.Builder addRanges(int index, KeyRange.Builder builderForValue)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameters
Name Description
index int
builderForValue KeyRange.Builder
Returns
Type Description
KeySet.Builder

addRangesBuilder()

public KeyRange.Builder addRangesBuilder()

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Returns
Type Description
KeyRange.Builder

addRangesBuilder(int index)

public KeyRange.Builder addRangesBuilder(int index)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameter
Name Description
index int
Returns
Type Description
KeyRange.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public KeySet.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
KeySet.Builder
Overrides

build()

public KeySet build()
Returns
Type Description
KeySet

buildPartial()

public KeySet buildPartial()
Returns
Type Description
KeySet

clear()

public KeySet.Builder clear()
Returns
Type Description
KeySet.Builder
Overrides

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
Type Description
KeySet.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public KeySet.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
KeySet.Builder
Overrides

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.

repeated .google.protobuf.ListValue keys = 1;

Returns
Type Description
KeySet.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public KeySet.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
KeySet.Builder
Overrides

clearRanges()

public KeySet.Builder clearRanges()

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Returns
Type Description
KeySet.Builder

clone()

public KeySet.Builder clone()
Returns
Type Description
KeySet.Builder
Overrides

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;

Returns
Type Description
boolean

The all.

getDefaultInstanceForType()

public KeySet getDefaultInstanceForType()
Returns
Type Description
KeySet

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getKeys(int index)

public 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.

repeated .google.protobuf.ListValue keys = 1;

Parameter
Name Description
index int
Returns
Type Description
ListValue

getKeysBuilder(int index)

public 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.

repeated .google.protobuf.ListValue keys = 1;

Parameter
Name Description
index int
Returns
Type Description
Builder

getKeysBuilderList()

public List<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.

repeated .google.protobuf.ListValue keys = 1;

Returns
Type Description
List<Builder>

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.

repeated .google.protobuf.ListValue keys = 1;

Returns
Type Description
int

getKeysList()

public List<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.

repeated .google.protobuf.ListValue keys = 1;

Returns
Type Description
List<ListValue>

getKeysOrBuilder(int index)

public 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.

repeated .google.protobuf.ListValue keys = 1;

Parameter
Name Description
index int
Returns
Type Description
ListValueOrBuilder

getKeysOrBuilderList()

public List<? extends 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.

repeated .google.protobuf.ListValue keys = 1;

Returns
Type Description
List<? extends com.google.protobuf.ListValueOrBuilder>

getRanges(int index)

public KeyRange getRanges(int index)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameter
Name Description
index int
Returns
Type Description
KeyRange

getRangesBuilder(int index)

public KeyRange.Builder getRangesBuilder(int index)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameter
Name Description
index int
Returns
Type Description
KeyRange.Builder

getRangesBuilderList()

public List<KeyRange.Builder> getRangesBuilderList()

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Returns
Type Description
List<Builder>

getRangesCount()

public int getRangesCount()

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Returns
Type Description
int

getRangesList()

public List<KeyRange> getRangesList()

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Returns
Type Description
List<KeyRange>

getRangesOrBuilder(int index)

public KeyRangeOrBuilder getRangesOrBuilder(int index)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameter
Name Description
index int
Returns
Type Description
KeyRangeOrBuilder

getRangesOrBuilderList()

public List<? extends KeyRangeOrBuilder> getRangesOrBuilderList()

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Returns
Type Description
List<? extends com.google.spanner.v1.KeyRangeOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public KeySet.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
KeySet.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public KeySet.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
KeySet.Builder
Overrides

mergeFrom(KeySet other)

public KeySet.Builder mergeFrom(KeySet other)
Parameter
Name Description
other KeySet
Returns
Type Description
KeySet.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final KeySet.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
KeySet.Builder
Overrides

removeKeys(int index)

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.

repeated .google.protobuf.ListValue keys = 1;

Parameter
Name Description
index int
Returns
Type Description
KeySet.Builder

removeRanges(int index)

public KeySet.Builder removeRanges(int index)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameter
Name Description
index int
Returns
Type Description
KeySet.Builder

setAll(boolean value)

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;

Parameter
Name Description
value boolean

The all to set.

Returns
Type Description
KeySet.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public KeySet.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
KeySet.Builder
Overrides

setKeys(int index, ListValue value)

public KeySet.Builder setKeys(int index, 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.

repeated .google.protobuf.ListValue keys = 1;

Parameters
Name Description
index int
value ListValue
Returns
Type Description
KeySet.Builder

setKeys(int index, ListValue.Builder builderForValue)

public KeySet.Builder setKeys(int index, 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.

repeated .google.protobuf.ListValue keys = 1;

Parameters
Name Description
index int
builderForValue Builder
Returns
Type Description
KeySet.Builder

setRanges(int index, KeyRange value)

public KeySet.Builder setRanges(int index, KeyRange value)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameters
Name Description
index int
value KeyRange
Returns
Type Description
KeySet.Builder

setRanges(int index, KeyRange.Builder builderForValue)

public KeySet.Builder setRanges(int index, KeyRange.Builder builderForValue)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameters
Name Description
index int
builderForValue KeyRange.Builder
Returns
Type Description
KeySet.Builder

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

public KeySet.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
KeySet.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final KeySet.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
KeySet.Builder
Overrides