Package oracle.kv.table

# Class KeyPair

java.lang.Object
oracle.kv.table.KeyPair

All Implemented Interfaces:
  `Comparable<KeyPair>`

public class KeyPair extends Object implements Comparable<KeyPair>
A wrapper class for return values from `TableAPI.tableKeysIterator(IndexKey, MultiRowOptions, oracle.kv.table.TableIteratorOptions)` This classes allows the iterator to return all field value information that can be obtained directly from the index without an additional fetch. Note: this class has a natural ordering that is inconsistent with equals. Ordering is based on the indexKey only.

Since:
  3.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(KeyPair other)`
  Compares the IndexKey of this object with the IndexKey of the specified object for order.
  `IndexKey`
  `getIndexKey()`
  Returns the IndexKey from the pair.
  `PrimaryKey`
  `getPrimaryKey()`
  Returns the PrimaryKey from the pair.
  `String`
  `toJsonString()`

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getPrimaryKey

    public PrimaryKey getPrimaryKey()
    Returns the PrimaryKey from the pair.
    Returns:
      the PrimaryKey

  - ### getIndexKey

    public IndexKey getIndexKey()
    Returns the IndexKey from the pair.
    Returns:
      the IndexKey

  - ### compareTo

    public int compareTo(KeyPair other)
    Compares the IndexKey of this object with the IndexKey of the specified object for order. If the IndexKey values are the same a secondary comparison is done on the PrimaryKey values.
    Specified by:
      `compareTo` in interface `Comparable<KeyPair>`

  - ### toJsonString

    public String toJsonString()