Package javax.persistence
Annotation Type Index
-
@Target({}) @Retention(RUNTIME) public @interface Index
The Index annotation is used in schema generation. Note that it is not necessary to specify an index for a primary key, as the primary key index will be created automatically, however, the Index annotation may be used to specify the ordering of the columns in the index for the primary key.- Since:
- JPA 2.1
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description StringcolumnList(Required) The names of the columns to be included in the index.
-
-
-
Element Detail
-
columnList
String columnList
(Required) The names of the columns to be included in the index.- Returns:
- The names of the columns making up the index
-
-
-
unique
boolean unique
(Optional) Whether the index is unique. Default is false.- Returns:
- Is the index unique?
- Default:
- false
-
-