Top Description Methods
org.eclipse.persistence.annotations

public @Interface Index

extends Annotation
Annotations
@Target:METHOD, FIELD, TYPE
@Retention:RUNTIME
@Repeatable:Indexes
Imports
java.lang.annotation.Retention, .Target, .Repeatable

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

Method Summary

Modifier and TypeMethod and Description
public String
catalog()

The catalog of the INDEX

public String[]
columnNames()

Specify the set of columns to define the index on.

public String
name()

The name of the INDEX, defaults to INDEX_<table-name>

public String
schema()

The schema of the INDEX

public String
table()

The table to define the index on, defaults to entities primary table.

public boolean
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

catalogback to summary
public String catalog()

The catalog of the INDEX

columnNamesback to summary
public String[] columnNames()

Specify the set of columns to define the index on. Not required when annotated on a field/method.

nameback to summary
public String name()

The name of the INDEX, defaults to INDEX_<table-name>

schemaback to summary
public String schema()

The schema of the INDEX

tableback to summary
public String table()

The table to define the index on, defaults to entities primary table.

uniqueback to summary
public boolean unique()