Annotation Interface KeyComponent
Marks a field or getter method as contributing to a composite key component.
The component() value identifies the key component name (e.g.
"PK" or "SK"). The position() defines the
ordering of parts within a composite key. Multiple fields or methods
with the same component name and different positions are concatenated
with # separators at runtime.
Used together with @Entity for single-table designs.
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionintThe ordering position within the composite key (lower values come first).
-
Element Details
-
component
-
position
int positionThe ordering position within the composite key (lower values come first).- Returns:
- the position index
- Default:
0
-