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 Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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 a JsonObject using 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[].