oracle.kv.table

## Interface PrimaryKey

- All Superinterfaces:
    Comparable<FieldValue>, FieldValue, RecordValue, Row

      public interface PrimaryKey
      extends Row

  PrimaryKey is a specialization of Row to represent a primary key used to access records in a table using the `TableAPI`. It may contain all or part of a primary key for its associated table. If a PrimaryKey is partially filled the fields must be set in order of significance, as defined by the list returned by `getFields()`. If an attempt is made to set a field that is not part of the primary key IllegalArgumentException is thrown.

  PrimaryKey objects are constructed using `createPrimaryKey`.

  Since:
    3.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `PrimaryKey` | `clone()` Returns a deep copy of this object.
    `List<String>` | `getFields()` Returns an unmodifiable list of fields, in key order, that comprise this key.

    - ### Methods inherited from interface oracle.kv.table.Row

      `createPrimaryKey, equals, getTable, getTableVersion, getVersion`

    - ### Methods inherited from interface oracle.kv.table.RecordValue

      `contains, copyFrom, get, getDefinition, isEmpty, put, put, put, put, put, put, put, put, putArray, putEnum, putFixed, putMap, putNull, putRecord, remove, size`

    - ### Methods inherited from interface oracle.kv.table.FieldValue

      `asArray, asBinary, asBoolean, asDouble, asEnum, asFixedBinary, asFloat, asIndexKey, asInteger, asLong, asMap, asPrimaryKey, asRecord, asRow, asString, getType, isArray, isBinary, isBoolean, isDouble, isEnum, isFixedBinary, isFloat, isIndexKey, isInteger, isLong, isMap, isNull, isPrimaryKey, isRecord, isRow, isString, toJsonString`

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

- - ### Method Detail

    - #### clone

          PrimaryKey clone()

      Returns a deep copy of this object.
      Specified by:
        `clone` in interface `FieldValue`
      Specified by:
        `clone` in interface `RecordValue`
      Specified by:
        `clone` in interface `Row`
      Returns:
        a deep copy of this object

    - #### getFields

          List<String> getFields()

      Returns an unmodifiable list of fields, in key order, that comprise this key. This method returns the same list as `Table.getPrimaryKey()` for this instance's Table.
      Specified by:
        `getFields` in interface `RecordValue`
      Returns:
        the fields
      Since:
        3.0.6

Copyright (c) 2011, 2014 Oracle and/or its affiliates. All rights reserved.