public final class ReadRequest
extends com.google.api.client.json.GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Cloud Spanner API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
com.google.api.client.util.GenericData.Flags
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
ReadRequest() |
Modifier and Type | Method and Description |
---|---|
ReadRequest |
clone() |
byte[] |
decodePartitionToken()
If present, results are restricted to the specified partition previously created using
`PartitionRead`.
|
byte[] |
decodeResumeToken()
If this request is resuming a previously interrupted read, `resume_token` should be copied from
the last PartialResultSet yielded before the interruption.
|
ReadRequest |
encodePartitionToken(byte[] partitionToken)
If present, results are restricted to the specified partition previously created using
`PartitionRead`.
|
ReadRequest |
encodeResumeToken(byte[] resumeToken)
If this request is resuming a previously interrupted read, `resume_token` should be copied from
the last PartialResultSet yielded before the interruption.
|
List<String> |
getColumns()
Required.
|
Boolean |
getDataBoostEnabled()
If this is for a partitioned read and this field is set to `true`, the request is executed with
Spanner Data Boost independent compute resources.
|
DirectedReadOptions |
getDirectedReadOptions()
Directed read options for this request.
|
String |
getIndex()
If non-empty, the name of an index on table.
|
KeySet |
getKeySet()
Required.
|
Long |
getLimit()
If greater than zero, only the first `limit` rows are yielded.
|
String |
getLockHint()
Optional.
|
String |
getOrderBy()
Optional.
|
String |
getPartitionToken()
If present, results are restricted to the specified partition previously created using
`PartitionRead`.
|
RequestOptions |
getRequestOptions()
Common options for this request.
|
String |
getResumeToken()
If this request is resuming a previously interrupted read, `resume_token` should be copied from
the last PartialResultSet yielded before the interruption.
|
String |
getTable()
Required.
|
TransactionSelector |
getTransaction()
The transaction to use.
|
ReadRequest |
set(String fieldName,
Object value) |
ReadRequest |
setColumns(List<String> columns)
Required.
|
ReadRequest |
setDataBoostEnabled(Boolean dataBoostEnabled)
If this is for a partitioned read and this field is set to `true`, the request is executed with
Spanner Data Boost independent compute resources.
|
ReadRequest |
setDirectedReadOptions(DirectedReadOptions directedReadOptions)
Directed read options for this request.
|
ReadRequest |
setIndex(String index)
If non-empty, the name of an index on table.
|
ReadRequest |
setKeySet(KeySet keySet)
Required.
|
ReadRequest |
setLimit(Long limit)
If greater than zero, only the first `limit` rows are yielded.
|
ReadRequest |
setLockHint(String lockHint)
Optional.
|
ReadRequest |
setOrderBy(String orderBy)
Optional.
|
ReadRequest |
setPartitionToken(String partitionToken)
If present, results are restricted to the specified partition previously created using
`PartitionRead`.
|
ReadRequest |
setRequestOptions(RequestOptions requestOptions)
Common options for this request.
|
ReadRequest |
setResumeToken(String resumeToken)
If this request is resuming a previously interrupted read, `resume_token` should be copied from
the last PartialResultSet yielded before the interruption.
|
ReadRequest |
setTable(String table)
Required.
|
ReadRequest |
setTransaction(TransactionSelector transaction)
The transaction to use.
|
getFactory, setFactory, toPrettyString, toString
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
clear, containsKey, containsValue, isEmpty, keySet, size, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public List<String> getColumns()
null
for nonepublic ReadRequest setColumns(List<String> columns)
columns
- columns or null
for nonepublic Boolean getDataBoostEnabled()
null
for nonepublic ReadRequest setDataBoostEnabled(Boolean dataBoostEnabled)
dataBoostEnabled
- dataBoostEnabled or null
for nonepublic DirectedReadOptions getDirectedReadOptions()
null
for nonepublic ReadRequest setDirectedReadOptions(DirectedReadOptions directedReadOptions)
directedReadOptions
- directedReadOptions or null
for nonepublic String getIndex()
null
for nonepublic ReadRequest setIndex(String index)
index
- index or null
for nonepublic KeySet getKeySet()
null
for nonepublic ReadRequest setKeySet(KeySet keySet)
keySet
- keySet or null
for nonepublic Long getLimit()
null
for nonepublic ReadRequest setLimit(Long limit)
limit
- limit or null
for nonepublic String getLockHint()
null
for nonepublic ReadRequest setLockHint(String lockHint)
lockHint
- lockHint or null
for nonepublic String getOrderBy()
null
for nonepublic ReadRequest setOrderBy(String orderBy)
orderBy
- orderBy or null
for nonepublic String getPartitionToken()
null
for nonedecodePartitionToken()
public byte[] decodePartitionToken()
null
for nonegetPartitionToken()
public ReadRequest setPartitionToken(String partitionToken)
partitionToken
- partitionToken or null
for none#encodePartitionToken()
public ReadRequest encodePartitionToken(byte[] partitionToken)
The value is encoded Base64 or {@code null} for none.
public RequestOptions getRequestOptions()
null
for nonepublic ReadRequest setRequestOptions(RequestOptions requestOptions)
requestOptions
- requestOptions or null
for nonepublic String getResumeToken()
null
for nonedecodeResumeToken()
public byte[] decodeResumeToken()
null
for nonegetResumeToken()
public ReadRequest setResumeToken(String resumeToken)
resumeToken
- resumeToken or null
for none#encodeResumeToken()
public ReadRequest encodeResumeToken(byte[] resumeToken)
The value is encoded Base64 or {@code null} for none.
public String getTable()
null
for nonepublic ReadRequest setTable(String table)
table
- table or null
for nonepublic TransactionSelector getTransaction()
null
for nonepublic ReadRequest setTransaction(TransactionSelector transaction)
transaction
- transaction or null
for nonepublic ReadRequest set(String fieldName, Object value)
set
in class com.google.api.client.json.GenericJson
public ReadRequest clone()
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2025 Google. All rights reserved.