Package oracle.nosql.driver.ops

# Class GetResult

java.lang.Object
oracle.nosql.driver.ops.Result
oracle.nosql.driver.ops.GetResult

public class GetResult extends Result
Represents the result of a `NoSQLHandle.get(oracle.nosql.driver.ops.GetRequest)` operation.

On a successful operation the value of the row is available using `getValue()` and the other state available in this class is valid. On failure that value is null and other state, other than consumed capacity, is undefined.

See Also:
  - `NoSQLHandle.get(oracle.nosql.driver.ops.GetRequest)`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GetResult()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getExpirationTime()`
  Returns the expiration time of the row.
  `String`
  `getJsonValue()`
  Returns a JSON string representation of the returned row, or null if the row does not exist.
  `long`
  `getModificationTime()`
  Returns the modification time of the row.
  `int`
  `getReadKB()`
  Returns the read throughput consumed by this operation, in KBytes.
  `int`
  `getReadUnits()`
  Returns the read throughput consumed by this operation, in read units.
  `MapValue`
  `getValue()`
  Returns the value of the returned row, or null if the row does not exist
  `Version`
  `getVersion()`
  Returns the `Version` of the row if the operation was successful, or null if the row does not exist.
  `int`
  `getWriteKB()`
  Returns the write throughput consumed by this operation, in KBytes.
  `int`
  `getWriteUnits()`
  Returns the write throughput consumed by this operation, in write units.
  `String`
  `toString()`

  ### Methods inherited from class oracle.nosql.driver.ops.Result

  `getRateLimitDelayedMs, getRetryStats`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### GetResult

    public GetResult()

- ## Method Details

  - ### getValue

    public MapValue getValue()
    Returns the value of the returned row, or null if the row does not exist
    Returns:
      the value of the row, or null if it does not exist

  - ### getJsonValue

    public String getJsonValue()
    Returns a JSON string representation of the returned row, or null if the row does not exist.
    Returns:
      the JSON string value of the row, or null if it does not exist

  - ### getVersion

    public Version getVersion()
    Returns the `Version` of the row if the operation was successful, or null if the row does not exist.
    Returns:
      the version of the row, or null if the row does not exist

  - ### getExpirationTime

    public long getExpirationTime()
    Returns the expiration time of the row. A zero value indicates that the row does not expire. This value is valid only if the operation successfully returned a row (`getValue()` returns non-null).
    Returns:
      the expiration time in milliseconds since January 1, 1970, or zero if the row never expires or the row does not exist

  - ### getModificationTime

    public long getModificationTime()
    Returns the modification time of the row. This value is valid only if the operation successfully returned a row (`getValue()` returns non-null).
    Returns:
      the modification time in milliseconds since January 1, 1970, or zero if the row does not exist
    Since:
      5.3.0

  - ### getReadKB

    public int getReadKB()
    Returns the read throughput consumed by this operation, in KBytes. This is the actual amount of data read by the operation. The number of read units consumed is returned by `getReadUnits()` which may be a larger number if the operation used `Consistency.ABSOLUTE`
    Returns:
      the read KBytes consumed

  - ### getWriteKB

    public int getWriteKB()
    Returns the write throughput consumed by this operation, in KBytes.
    Returns:
      the write KBytes consumed

  - ### getReadUnits

    public int getReadUnits()
    Returns the read throughput consumed by this operation, in read units. This number may be larger than that returned by `getReadKB()` if the operation used `Consistency.ABSOLUTE`
    Returns:
      the read units consumed

  - ### getWriteUnits

    public int getWriteUnits()
    Returns the write throughput consumed by this operation, in write units.
    Returns:
      the write units consumed

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`