About persistence

javax.persistence Annotation ExcludeSuperclassListeners Target: Classes Specifies that the invocation of superclass listeners is to be excluded for the entity class (or mapped superclass) and its subclasses. Since: JPA 1.0 Learn how to define and use entity listeners in Chapter 3 of the ObjectDB

javax.persistence Annotation Id Target: Fields (including property get methods) Specifies the primary key of an entity. The field or property to which the Id annotation is applied should be one of the following types: any Java primitive type; any primitive wrapper type; String; java.util.Date; java

javax.persistence Annotation IdClass Target: Classes Specifies a composite primary key class that is mapped to multiple fields or properties of the entity. The names of the fields or properties in the primary key class and the primary key fields or properties of the entity must correspond

javax.persistence Annotation JoinColumns Target: Fields (including property get methods) Defines mapping for composite foreign keys. This annotation groups JoinColumn annotations for the same relationship. When the JoinColumns annotation is used, both the name and the referencedColumnName elements

javax.persistence Annotation JoinTable Target: Fields (including property get methods) Used in the mapping of associations. It is specified on the owning side of an association. A join table is typically used in the mapping of many-to-many and unidirectional one-to-many associations

javax.persistence Annotation MapKeyClass Target: Fields (including property get methods) Specifies the type of the map key for associations of type java.util.Map. The map key can be a basic type, an embeddable class, or an entity. If the map is specified using Java generics, the MapKeyClass

javax.persistence Annotation MappedSuperclass Target: Classes Designates a class whose mapping information is applied to the entities that inherit from it. A mapped superclass has no separate table defined for it. A class designated with the MappedSuperclass annotation can be mapped in the same way

javax.persistence Annotation MapsId Target: Fields (including property get methods) Designates a ManyToOne or OneToOne relationship attribute that provides the mapping for an EmbeddedId primary key, an attribute within an EmbeddedId primary key, or a simple primary key of the parent entity