javax.jdo.annotations

## Annotation Type Index

-     @Target(value={TYPE,FIELD,METHOD})
       @Retention(value=RUNTIME)
       @Repeatable(value=Indices.class)
      public @interface Index

  Annotation for a database index. Used for database schema generation to create indexes. Corresponds to the xml element "index".
  Since:
    2.1
  Version:
    3.2

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `Column[]` | `columns` Columns that compose this index.
    `Extension[]` | `extensions` Vendor extensions.
    `String[]` | `members` Member (field and property) names that compose this index.
    `String` | `name` Name of the index
    `String` | `table` Table for the index.
    `String` | `unique` Whether this index is unique

- - ### Element Detail

    - #### name

          public abstract String name

      Name of the index
      Returns:
        the name of the index
      Default:
        ""

  - - #### table

          public abstract String table

      Table for the index. This is needed iff annotating a type where the index is not defined on the primary table for the type.
      Returns:
        the table on which the index is defined
      Default:
        ""

  - - #### unique

          public abstract String unique

      Whether this index is unique
      Returns:
        whether this index is unique
      Default:
        ""

  - - #### members

          public abstract String[] members

      Member (field and property) names that compose this index.
      Returns:
        member names that compose this index
      Default:
        {}

  - - #### columns

          public abstract Column[] columns

      Columns that compose this index.
      Returns:
        columns that compose this index
      Default:
        {}

  - - #### extensions

          public abstract Extension[] extensions

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

Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.