Annotation Interface AlternateKey


@Documented @Retention(RUNTIME) @Target(TYPE) @Repeatable(Set.class) public @interface AlternateKey
Annotation which defines an alternate set of columns that uniquely identify a row instance. Row definitions aren't required to have any @AlternateKey annotations.

An alternate key is essentially the same as a secondary index, except with a uniqueness constraint applied. Attempting to insert a row with a conflicting alternate key causes a UniqueConstraintException to be thrown.

See Also:
  • Required Element Summary

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

    • value

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