Class TransactionGetResult
- java.lang.Object
-
- com.couchbase.client.java.transactions.TransactionGetResult
-
public class TransactionGetResult extends Object
Represents a value fetched from Couchbase, along with additional transactional metadata.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> TcontentAs(TypeRef<T> target)Decodes the content of the document into the target class.<T> TcontentAs(Class<T> target)Decodes the content of the document into the target class.byte[]contentAsBytes()Returns the raw unconverted contents as a byte[].JsonObjectcontentAsObject()Decodes the content of the document into aJsonObjectusing the default decoder.Stringid()Returns the document's ID, which must be unique across the bucket.StringtoString()
-
-
-
Method Detail
-
id
public String id()
Returns the document's ID, which must be unique across the bucket.
-
contentAsObject
public JsonObject contentAsObject()
Decodes the content of the document into aJsonObjectusing the default decoder.
-
contentAs
public <T> T contentAs(Class<T> target)
Decodes the content of the document into the target class.The JsonSerializer configured on the underlying Java SDK is used.
- Parameters:
target- the target class to decode the encoded content into.
-
contentAs
public <T> T contentAs(TypeRef<T> target)
Decodes the content of the document into the target class.The JsonSerializer configured on the underlying Java SDK is used.
- Parameters:
target- the target class to decode the encoded content into.
-
contentAsBytes
public byte[] contentAsBytes()
Returns the raw unconverted contents as a byte[].
-
-