Annotation Interface PrimaryKey


@Documented @Target(FIELD) @Retention(RUNTIME) public @interface PrimaryKey
Annotation for a SpannerPersistentEntity that allows specifying the primary key columns and their order.
Since:
1.1
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    The order of columns that comprise the primary key.
    int
    The order of columns that comprise the primary key.
  • Element Details

    • keyOrder

      @AliasFor(attribute="value") int keyOrder
      The order of columns that comprise the primary key. Starts at 1 is consecutive.
      Returns:
      the key order starting with 1 being first.
      Default:
      1
    • value

      @AliasFor(attribute="keyOrder") int value
      The order of columns that comprise the primary key. Starts at 1 is consecutive.
      Returns:
      the key order starting with 1 being first.
      Default:
      1