@Retention(CLASS) @Target({})
public @interface Index
Database index over mapped field names, declared on an entity.
Methods
public abstract String name() default "" | Names the database index. |
public abstract String[] fields() | Lists Java attribute names in index order, not SQL column names. |
public abstract boolean unique() default false | Requires indexed value combinations to be unique. |
Method details
name
public abstract String name() default ""Names the database index.
Returns
index name; empty by default to request a derived name
fields
public abstract String[] fields()Lists Java attribute names in index order, not SQL column names.
Returns
indexed fields
unique
public abstract boolean unique() default falseRequires indexed value combinations to be unique.
Returns
true for a unique index; false by default