JDO Annotation

Unique

Target: ElementType.TYPE, ElementType.FIELD, ElementType.METHOD
Implemented Interfaces:
Annotation

Annotation for a database unique constraint. Used for database schema generation to create unique constraints. Also used to reorder database operations when flushing changes to avoid unique constraint violations. Corresponds to the xml element "unique".
Since:
JDO 2.1

Public Annotation Attributes

Column[] columns default {}
Columns that compose this unique constraint.
Since:
JDO 2.1
String deferred default ""
Whether this unique constraint is deferred until commit.
Since:
JDO 2.1
String[] members default {}
Member (field and property) names that compose this unique constraint.
Since:
JDO 2.1
String name default ""
Name of the unique constraint.
Since:
JDO 2.1
String table default ""
Table for the unique constraint.
This is needed iff annotating a type where this unique constraint is not for the primary table for the persistent class or interface.
Since:
JDO 2.1