Class KeySet.Builder (6.50.1)

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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.protobuf.ListValue>
Returns
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.spanner.v1.KeyRange>
Returns
TypeDescription
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
NameDescription
valueListValue
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
indexint
valueListValue
Returns
TypeDescription
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
NameDescription
indexint
builderForValueBuilder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueKeyRange
Returns
TypeDescription
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
NameDescription
builderForValueKeyRange.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueKeyRange
Returns
TypeDescription
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
NameDescription
indexint
builderForValueKeyRange.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
KeyRange.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public KeySet.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
KeySet.Builder
Overrides

build()

public KeySet build()
Returns
TypeDescription
KeySet

buildPartial()

public KeySet buildPartial()
Returns
TypeDescription
KeySet

clear()

public KeySet.Builder clear()
Returns
TypeDescription
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
TypeDescription
KeySet.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public KeySet.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
KeySet.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public KeySet.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
KeySet.Builder

clone()

public KeySet.Builder clone()
Returns
TypeDescription
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
TypeDescription
boolean

The all.

getDefaultInstanceForType()

public KeySet getDefaultInstanceForType()
Returns
TypeDescription
KeySet

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.spanner.v1.KeyRangeOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public KeySet.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
KeySet.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public KeySet.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
KeySet.Builder
Overrides

mergeFrom(KeySet other)

public KeySet.Builder mergeFrom(KeySet other)
Parameter
NameDescription
otherKeySet
Returns
TypeDescription
KeySet.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final KeySet.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueboolean

The all to set.

Returns
TypeDescription
KeySet.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public KeySet.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint
valueListValue
Returns
TypeDescription
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
NameDescription
indexint
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
indexint
valueKeyRange
Returns
TypeDescription
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
NameDescription
indexint
builderForValueKeyRange.Builder
Returns
TypeDescription
KeySet.Builder

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

public KeySet.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
KeySet.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final KeySet.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
KeySet.Builder
Overrides