public final class Transaction
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
Constructor and Description |
---|
Transaction() |
Modifier and Type | Method and Description |
---|---|
Transaction |
clone() |
byte[] |
decodeId()
`id` may be used to identify the transaction in subsequent Read, ExecuteSql, Commit, or
Rollback calls.
|
Transaction |
encodeId(byte[] id)
`id` may be used to identify the transaction in subsequent Read, ExecuteSql, Commit, or
Rollback calls.
|
java.lang.String |
getId()
`id` may be used to identify the transaction in subsequent Read, ExecuteSql, Commit, or
Rollback calls.
|
java.lang.String |
getReadTimestamp()
For snapshot read-only transactions, the read timestamp chosen for the transaction.
|
Transaction |
set(java.lang.String fieldName,
java.lang.Object value) |
Transaction |
setId(java.lang.String id)
`id` may be used to identify the transaction in subsequent Read, ExecuteSql, Commit, or
Rollback calls.
|
Transaction |
setReadTimestamp(java.lang.String readTimestamp)
For snapshot read-only transactions, the read timestamp chosen for the transaction.
|
getFactory, setFactory, toPrettyString, toString
entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeys
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, values
public java.lang.String getId()
null
for nonedecodeId()
public byte[] decodeId()
null
for nonegetId()
public Transaction setId(java.lang.String id)
id
- id or null
for none#encodeId()
public Transaction encodeId(byte[] id)
The value is encoded Base64 or {@code null} for none.
public java.lang.String getReadTimestamp()
null
for nonepublic Transaction setReadTimestamp(java.lang.String readTimestamp)
readTimestamp
- readTimestamp or null
for nonepublic Transaction set(java.lang.String fieldName, java.lang.Object value)
set
in class com.google.api.client.json.GenericJson
public Transaction clone()
clone
in class com.google.api.client.json.GenericJson