JDO Annotation

Key

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

Annotation for the key of a map relation. Corresponds to the xml element "key".
Since:
JDO 2.1

Public Annotation Attributes

String column default ""
Name of the column to store the key in.
Since:
JDO 2.1
Column[] columns default {}
The column(s) for the key
Since:
JDO 2.1
ForeignKeyAction deleteAction default ForeignKeyAction.UNSPECIFIED
Delete action to apply to the foreign key for the key.
Since:
JDO 2.1
String dependent default ""
Whether the key is dependent on the owner (and will be deleted when the owner is deleted).
Since:
JDO 2.1
String embedded default ""
Whether this key is embedded.
Since:
JDO 2.1
The embedded mapping for the key.
Since:
JDO 2.1
Extension[] extensions default {}
Vendor extensions.
Since:
JDO 2.1
String foreignKey default ""
Name for a generated foreign key constraint.
Since:
JDO 2.1
String generateForeignKey default ""
Generate or assume a foreign key constraint exists on the column or columns associated with this join.
Specify "true" or "false".
Since:
JDO 2.1
String index default ""
The name of the index to generate.
Since:
JDO 2.1
String indexed default ""
Whether the value column(s) should be indexed.
Since:
JDO 2.1
String mappedBy default ""
Name of a member in the value class where this key is stored.
Since:
JDO 2.1
String serialized default ""
Whether the key is to be stored serialized (into a single column of a join table).
Since:
JDO 2.1
String table default ""
Name of the table for the key.
Since:
JDO 2.1
Class[] types default {}
Types of the keys.
This can be determined if using JDK1.5 generics but is required otherwise. Multiple types can be specified if the implementation supports multiple types.
Since:
JDO 2.1
String unique default ""
Whether the element column(s) contents should be considered unique
Since:
JDO 2.1
String uniqueKey default ""
The name of the unique key constraint to generate.
Since:
JDO 2.1
ForeignKeyAction updateAction default ForeignKeyAction.UNSPECIFIED
Update action to apply to the foreign key for the key.
Since:
JDO 2.1