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| Modifier and Type | Class and Description |
|---|---|
static class |
KeySet.Builder
`KeySet` defines a collection of Cloud Spanner keys and/or key ranges.
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable| Modifier and Type | Field and Description |
|---|---|
static int |
ALL_FIELD_NUMBER |
static int |
KEYS_FIELD_NUMBER |
static int |
RANGES_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFieldsmemoizedSizememoizedHashCode| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
boolean |
getAll()
For convenience `all` can be set to `true` to indicate that this
`KeySet` matches all keys in the table or index.
|
static KeySet |
getDefaultInstance() |
KeySet |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
ListValue |
getKeys(int index)
A list of specific keys.
|
int |
getKeysCount()
A list of specific keys.
|
java.util.List<ListValue> |
getKeysList()
A list of specific keys.
|
ListValueOrBuilder |
getKeysOrBuilder(int index)
A list of specific keys.
|
java.util.List<? extends ListValueOrBuilder> |
getKeysOrBuilderList()
A list of specific keys.
|
Parser<KeySet> |
getParserForType() |
KeyRange |
getRanges(int index)
A list of key ranges.
|
int |
getRangesCount()
A list of key ranges.
|
java.util.List<KeyRange> |
getRangesList()
A list of key ranges.
|
KeyRangeOrBuilder |
getRangesOrBuilder(int index)
A list of key ranges.
|
java.util.List<? extends KeyRangeOrBuilder> |
getRangesOrBuilderList()
A list of key ranges.
|
int |
getSerializedSize() |
UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static KeySet.Builder |
newBuilder() |
static KeySet.Builder |
newBuilder(KeySet prototype) |
KeySet.Builder |
newBuilderForType() |
protected KeySet.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent) |
static KeySet |
parseDelimitedFrom(java.io.InputStream input) |
static KeySet |
parseDelimitedFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static KeySet |
parseFrom(byte[] data) |
static KeySet |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static KeySet |
parseFrom(java.nio.ByteBuffer data) |
static KeySet |
parseFrom(java.nio.ByteBuffer data,
ExtensionRegistryLite extensionRegistry) |
static KeySet |
parseFrom(ByteString data) |
static KeySet |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static KeySet |
parseFrom(CodedInputStream input) |
static KeySet |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static KeySet |
parseFrom(java.io.InputStream input) |
static KeySet |
parseFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<KeySet> |
parser() |
KeySet.Builder |
toBuilder() |
void |
writeTo(CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, newBuilderForType, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneoftoByteArray, toByteString, writeDelimitedTo, writeTopublic static final int KEYS_FIELD_NUMBER
public static final int RANGES_FIELD_NUMBER
public static final int ALL_FIELD_NUMBER
public final UnknownFieldSet getUnknownFields()
getUnknownFields in interface MessageOrBuildergetUnknownFields in class GeneratedMessageV3public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class GeneratedMessageV3public java.util.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][google.spanner.v1.TypeCode].
repeated .google.protobuf.ListValue keys = 1;getKeysList in interface KeySetOrBuilderpublic java.util.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][google.spanner.v1.TypeCode].
repeated .google.protobuf.ListValue keys = 1;getKeysOrBuilderList in interface KeySetOrBuilderpublic 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;getKeysCount in interface KeySetOrBuilderpublic 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;getKeys in interface KeySetOrBuilderpublic 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;getKeysOrBuilder in interface KeySetOrBuilderpublic java.util.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;getRangesList in interface KeySetOrBuilderpublic java.util.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;getRangesOrBuilderList in interface KeySetOrBuilderpublic 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;getRangesCount in interface KeySetOrBuilderpublic 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;getRanges in interface KeySetOrBuilderpublic 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;getRangesOrBuilder in interface KeySetOrBuilderpublic 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;getAll in interface KeySetOrBuilderpublic final boolean isInitialized()
isInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessageV3public void writeTo(CodedOutputStream output) throws java.io.IOException
writeTo in interface MessageLitewriteTo in class GeneratedMessageV3java.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface MessageLitegetSerializedSize in class GeneratedMessageV3public boolean equals(java.lang.Object obj)
equals in interface Messageequals in class AbstractMessagepublic int hashCode()
hashCode in interface MessagehashCode in class AbstractMessagepublic static KeySet parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static KeySet parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static KeySet parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static KeySet parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static KeySet parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static KeySet parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static KeySet parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static KeySet parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static KeySet parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static KeySet parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static KeySet parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static KeySet parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic KeySet.Builder newBuilderForType()
newBuilderForType in interface MessagenewBuilderForType in interface MessageLitepublic static KeySet.Builder newBuilder()
public static KeySet.Builder newBuilder(KeySet prototype)
public KeySet.Builder toBuilder()
toBuilder in interface MessagetoBuilder in interface MessageLiteprotected KeySet.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class GeneratedMessageV3public static KeySet getDefaultInstance()
public Parser<KeySet> getParserForType()
getParserForType in interface MessagegetParserForType in interface MessageLitegetParserForType in class GeneratedMessageV3public KeySet getDefaultInstanceForType()
getDefaultInstanceForType in interface MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilder