Annotation Type Index


  • @Retention(RUNTIME)
    @Documented
    @Target({TYPE,FIELD,METHOD,ANNOTATION_TYPE})
    @Repeatable(Indexes.class)
    @Inherited
    public @interface Index
    Designates one of the indexes part of the indexes member within an Table annotation. Typically not used directly but instead mapped to via annotation such as javax.persistence.Index.
    Since:
    2.4
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String[] columns
      (Required) The list of columns to be used to create an index.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String name
      (Optional) The name of the index; defaults to a provider-generated name.
      boolean unique  
    • Element Detail

      • columns

        java.lang.String[] columns
        (Required) The list of columns to be used to create an index.
        Returns:
        The list of columns
      • name

        java.lang.String name
        (Optional) The name of the index; defaults to a provider-generated name.
        Returns:
        The name of the index
        Default:
        ""
      • unique

        boolean unique
        Returns:
        (Optional) Whether the index is unique
        Default:
        false