Annotation Type Index


@Target({TYPE,FIELD,METHOD}) @Retention(RUNTIME) 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:
2.1
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Columns that compose this index.
    Member (field and property) names that compose this index.
    Name of the index
    Table for the index.
    Whether this index is unique
  • Element Details

    • name

      String name
      Name of the index
      Returns:
      the name of the index
      Default:
      ""
    • table

      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

      String unique
      Whether this index is unique
      Returns:
      whether this index is unique
      Default:
      ""
    • members

      String[] members
      Member (field and property) names that compose this index.
      Returns:
      member names that compose this index
      Default:
      {}
    • columns

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