Class KeySet (6.60.0)

public final class KeySet extends GeneratedMessageV3 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 Fields

ALL_FIELD_NUMBER

public static final int ALL_FIELD_NUMBER
Field Value
TypeDescription
int

KEYS_FIELD_NUMBER

public static final int KEYS_FIELD_NUMBER
Field Value
TypeDescription
int

RANGES_FIELD_NUMBER

public static final int RANGES_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static KeySet getDefaultInstance()
Returns
TypeDescription
KeySet

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static KeySet.Builder newBuilder()
Returns
TypeDescription
KeySet.Builder

newBuilder(KeySet prototype)

public static KeySet.Builder newBuilder(KeySet prototype)
Parameter
NameDescription
prototypeKeySet
Returns
TypeDescription
KeySet.Builder

parseDelimitedFrom(InputStream input)

public static KeySet parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
KeySet
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static KeySet parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
KeySet
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static KeySet parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
KeySet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static KeySet parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
KeySet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static KeySet parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
KeySet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static KeySet parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
KeySet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static KeySet parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
KeySet
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static KeySet parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
KeySet
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static KeySet parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
KeySet
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static KeySet parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
KeySet
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static KeySet parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
KeySet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static KeySet parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
KeySet
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<KeySet> parser()
Returns
TypeDescription
Parser<KeySet>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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

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

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>

getParserForType()

public Parser<KeySet> getParserForType()
Returns
TypeDescription
Parser<KeySet>
Overrides

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

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>

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public KeySet.Builder newBuilderForType()
Returns
TypeDescription
KeySet.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected KeySet.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
KeySet.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public KeySet.Builder toBuilder()
Returns
TypeDescription
KeySet.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException