@Target(value=FIELD)
@Retention(value=RUNTIME)
public @interface CompositeIndex
The annotated field must also be annotated with @Column.
The annotated field can also be marked as a single-column index by using @Index.
To mark a field as part of an unique composite index, use @UniqueCompositeIndex.
Column,
Index,
UniqueCompositeIndex| Modifier and Type | Required Element and Description |
|---|---|
int |
order
The order of the annotated field in the composite index.
|
| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.String[] |
value
The names of the composite indexes.
|
public abstract int order
The value can be arbitrary. The final order is determined by comparing this value.
public abstract java.lang.String[] value
When there is more than one field annotated, all of them will be included in the composite index under this name.
value cannot be null.