Annotation Type Key
Annotation for the key of a map relation.
Corresponds to the xml element "key".
- Since:
- 2.1
- Version:
- 2.1
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionName of the column to store the key in.Column[]The column(s) for the keyDelete action to apply to the foreign key for the key.Whether the key is dependent on the owner (and will be deleted when the owner is deleted).Whether this key is embedded.Embedded[]The embedded mapping for the key.Vendor extensions.Name for a generated foreign key constraint.Generate or assume a foreign key constraint exists on the column or columns associated with this join.The name of the index to generate.Whether the value column(s) should be indexed.Name of a member in the value class where this key is stored.Whether the key is to be stored serialized (into a single column of a join table).Name of the table for the key.Class[]Types of the keys.Whether the element column(s) contents should be considered uniqueThe name of the unique key constraint to generate.Update action to apply to the foreign key for the key.
-
Element Details
-
types
Class[] typesTypes 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.- Returns:
- the types of keys
- Default:
{}
-
serialized
String serializedWhether the key is to be stored serialized (into a single column of a join table).- Returns:
- whether the key is to be stored serialized
- Default:
""
-
embedded
-
embeddedMapping
Embedded[] embeddedMappingThe embedded mapping for the key.- Returns:
- the embedded mapping for the key
- Default:
{}
-
dependent
String dependentWhether the key is dependent on the owner (and will be deleted when the owner is deleted).- Returns:
- whether the key is dependent on the owner
- Default:
""
-
table
-
column
String columnName of the column to store the key in.- Returns:
- name of the column to store the key in
- Default:
""
-
deleteAction
ForeignKeyAction deleteActionDelete action to apply to the foreign key for the key.- Returns:
- delete action to apply to the foreign key for the key
- Default:
UNSPECIFIED
-
updateAction
ForeignKeyAction updateActionUpdate action to apply to the foreign key for the key.- Returns:
- update action to apply to the foreign key for the key
- Default:
UNSPECIFIED
-
indexed
String indexedWhether the value column(s) should be indexed.- Returns:
- whether the value column(s) should be indexed.
- Default:
""
-
index
-
unique
String uniqueWhether the element column(s) contents should be considered unique- Returns:
- whether the element column(s) contents should be considered unique
- Default:
""
-
uniqueKey
String uniqueKeyThe name of the unique key constraint to generate.- Returns:
- the name of the unique key constraint
- Default:
""
-
mappedBy
String mappedByName of a member in the value class where this key is stored.- Returns:
- the name of a member in the value class where this key is stored
- Default:
""
-
columns
-
generateForeignKey
String generateForeignKeyGenerate or assume a foreign key constraint exists on the column or columns associated with this join. Specify "true" or "false".- Returns:
- whether to generate or assume a foreign key constraint
- Default:
""
-
foreignKey
String foreignKeyName for a generated foreign key constraint.- Returns:
- the name of the generated foreign key constraint
- Default:
""
-
extensions
-