javax.jdo.annotations

## Annotation Type PrimaryKey

-     @Target(value={TYPE,FIELD,METHOD})
       @Retention(value=RUNTIME)
      public @interface PrimaryKey

  Annotation on a member to define it as a primary key member of a class or persistent interface using application identity. Also used to define the primary key columns of a secondary table. Corresponds to the xml element "primary-key".
  Since:
    2.1
  Version:
    2.1

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `String` | `column` Name of the column to use for the primary key
    `Column[]` | `columns` The column(s) for the primary key
    `Extension[]` | `extensions` Vendor extensions.
    `String` | `name` Name of the primary key constraint

- - ### Element Detail

    - #### name

          public abstract String name

      Name of the primary key constraint
      Returns:
        the name of the primary key constraint
      Default:
        ""

  - - #### column

          public abstract String column

      Name of the column to use for the primary key
      Returns:
        the name of the column to use for the primary key
      Default:
        ""

  - - #### columns

          public abstract Column[] columns

      The column(s) for the primary key
      Returns:
        the column(s) for the primary key
      Default:
        {}

  - - #### extensions

          public abstract Extension[] extensions

      Vendor extensions.
      Returns:
        the vendor extensions
      Default:
        {}

Copyright © 2005–1970 Apache Software Foundation. All rights reserved.