javax.persistence
Annotation Type Id


@Target(value={METHOD,FIELD})
@Retention(value=RUNTIME)
public @interface Id

The Id annotation specifies the primary key property or field of an entity. The Id annotation may be applied in an entity or mapped superclass.
By default, the mapped column for the primary key of the entity is assumed to be the primary key of the primary table. If no Column annotation is specified, the primary key column name is assumed to be the name of the primary key property or field.

Since:
EJB 3.0 version.
Author:
Florent Benoit
See Also:
EJB 3.0 specification