blob: 95b2969a79114a1a8cf8e77b8ec7ebcc7f18ec73 [file] [log] [blame]
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Index
{
/** Name of the index
* @return the name of the index
*/
String name() default "";
/** Table for the index. This is needed iff annotating a type where
* the index is not defined on the primary table for the type.
* @return the table on which the index is defined
*/
String table() default "";
/** Whether this index is unique
* @return whether this index is unique
*/
String unique() default "";
/** Member (field and property) names that compose this index.
* @return member names that compose this index
*/
String[] members() default {};
/** Columns that compose this index.
* @return columns that compose this index
*/
Column[] columns() default {};
}