Annotation Type Index
-
@Target({METHOD,FIELD,TYPE}) @Retention(RUNTIME) @Repeatable(Indexes.class) public @interface Index
Allow a database INDEX to be define when generating DDL. The @Index can be defined on a Entity class, or on an attribute. The column is defaulted when defined on a attribute.- Author:
- James Sutherland
- Since:
- EclipseLink 2.2
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
catalog
The catalog of the INDEXString[]
columnNames
Specify the set of columns to define the index on.String
name
The name of the INDEX, defaults to INDEX_<table-name>String
schema
The schema of the INDEXString
table
The table to define the index on, defaults to entities primary table.boolean
unique
-
-
-
Element Detail
-
name
String name
The name of the INDEX, defaults to INDEX_<table-name>- Default:
- ""
-
-
-
schema
String schema
The schema of the INDEX- Default:
- ""
-
-
-
catalog
String catalog
The catalog of the INDEX- Default:
- ""
-
-
-
table
String table
The table to define the index on, defaults to entities primary table.- Default:
- ""
-
-
-
columnNames
String[] columnNames
Specify the set of columns to define the index on. Not required when annotated on a field/method.- Default:
- {}
-
-