Annotation Interface PrimaryKey


@Documented @Retention(RUNTIME) @Target(TYPE) public @interface PrimaryKey
Annotation which defines the set of columns that uniquely identify a row instance. A row definition must have exactly one @PrimaryKey annotation.

A primary key is itself a special kind of index, and so no additional annotations are required to ensure that searches against the primary key are efficient.

See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The set of column names within primary key, whose ordering affects the natural ordering of the rows within the table.
  • Element Details

    • value

      String[] value
      The set of column names within primary key, whose ordering affects the natural ordering of the rows within the table. Column names can be optionally prefixed with a '+' or '-' character to indicate ascending or descending order. By default, column order is ascending.