Package javax.persistence

API used by EJB 3.0 container

See:
          Description

Interface Summary
EntityManager Interface used to interact with the persistence context.
EntityManagerFactory Factory of EntityManager.
EntityTransaction The EntityTransaction interface is used to control resource transactions on resource-local entity managers.
Query Interface used to control query execution.
 

Class Summary
Persistence Bootstrap class that is used to obtain an EntityManagerFactory.
 

Enum Summary
CascadeType List of operations that are cascadable.
DiscriminatorType The DiscriminatorType enum defines the different types for DiscriminatorColumn.
EnumType The EnumType enum defines the mapping for enumerated types.
FetchType The FetchType enum defines strategies for fetching data from the database.
FlushModeType When queries are executed within a transaction, if FlushModeType.AUTO is set on the Query object, or if the flush mode setting for the persistence context is AUTO (the default) and a flush mode setting has not been specified for the Query object, the persistence provider is responsible for ensuring that all updates to the state of all entities in the persistence context which could potentially affect the result of the query are visible to the processing of the query.
GenerationType Enumeration of the types of primary key generation.
InheritanceType The InheritanceType enum defines the strategy for mapping used in Inheritance.
LockModeType Lock modes available.
PersistenceContextType Enumeration of possible values for PersistenceContext : Transaction scoped or extended.
TemporalType The TemporalType enum defines the mapping for these temporal types.
 

Exception Summary
EntityExistsException The EntityExistsException may thrown by the persistence provider when the persist operation is invoked and the entity already exists.
EntityNotFoundException The EntityNotFoundException is thrown by the persistence provider when an entity reference obtained by getReference is accessed but the entity does not exist.
NonUniqueResultException The NonUniqueResultException is thrown by the persistence provider when Query.getSingleResult is invoked and there is more than one result from the query.
NoResultException The NoResultException is thrown by the persistence provider when Query.getSingleResult is invoked and there is no result to return.
OptimisticLockException The OptimisticLockException is thrown by the persistence provider when an optimistic locking conflict occurs.
PersistenceException The PersistenceException is thrown by the persistence provider when a problem occurs.
RollbackException The RollbackException is thrown by the persistence provider when EntityTransaction.
TransactionRequiredException The TransactionRequiredException is thrown by the persistence provider when a transaction is required but is not active.
 

Annotation Types Summary
AssociationOverride The AssociationOverride annotation is used to override a many-to-one or one-to-one mapping of property or field for an entity relationship.
The AssociationOverride annotation may be applied to an entity that extends a mapped superclass to override a many-to-one or one-to-one mapping defined by the mapped superclass.
AssociationOverrides The mappings of multiple many-to-one or one-to-one relationship properties or fields may be overridden.
AttributeOverride The AttributeOverride annotation is used to override the mapping of a Basic (whether explicit or default) property or field or Id property or field.
The AttributeOverride annotation may be applied to an entity that extends a mapped superclass or to an embedded field or property to override a basic mapping defined by the mapped superclass or embeddable class.
AttributeOverrides The mappings of multiple properties or fields may be overridden.
Basic The Basic annotation is the simplest type of mapping to a database column.
Column The Column annotation is used to specify a mapped column for a persistent property or field.
ColumnResult Mapping of a result.
DiscriminatorColumn The DiscriminatorColumn annotation can be specified on an entity class (including on an abstract entity class).
If the DiscriminatorColumn annotation is missing, and a discriminator column is required, the name of the discriminator column defaults to "DTYPE" and the discriminator type to STRING.
DiscriminatorValue The DiscriminatorValue annotation is used to specify the value of the discriminator column for entities of the given type.
Embeddable The Embeddable annotation is used to specify a class whose instances are stored as an intrinsic part of an owning entity and share the identity of the entity.
Embedded The Embedded annotation is used to specify a persistent field or property of an entity whose value is an instance of an embeddable class.
The AttributeOverride and/ or AttributeOverrides annotations may be used to override the column mappings declared within the embeddable class, which are mapped to the entity table.
Implementations are not required to support embedded objects that are mapped across more than one table (e.g., split across primary and secondary tables or multiple secondary tables).
EmbeddedId The EmbeddedId annotation is applied to a persistent field or property of an entity class or mapped superclass to denote a composite primary key that is an embeddable class.
Entity Class annotated with this annotation is an entity class.
EntityListeners The EntityListeners annotation specifies the callback listener classes to be used for an entity or mapped superclass.
EntityResult Mapping of a result.
Enumerated An Enumerated annotation specifies that a persistent property or field should be persisted as a enumerated type.
ExcludeDefaultListeners The ExcludeDefaultListeners annotation specifies that the invocation of default listeners is to be excluded for the entity class (or mapped superclass) and its subclasses.
ExcludeSuperclassListeners The ExcludeSuperclassListeners annotation specifies that the invocation of superclass listeners is to be excluded for the entity class (or mapped superclass) and its subclasses.
FieldResult Mapping of a result.
GeneratedValue The GeneratedValue annotation provides for the specification of generation strategies for the values of primary keys.
Id The Id annotation specifies the primary key property or field of an entity.
IdClass The IdClass annotation is applied to an entity class or a mapped superclass to specify 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 and their types must be the same.
Inheritance The JoinTable annotation is used in the mapping of associations.
JoinColumn The JoinColumn annotation is used to specify a mapped column for joining an entity association.
JoinColumns Composite foreign keys are supported by means of the JoinColumns annotation.
JoinTable The JoinTable annotation is used in the mapping of associations.
Lob A Lob annotation specifies that a persistent property or field should be persisted as a large object to a database-supported large object type.
ManyToMany A ManyToMany annotation defines a many-valued association with many-to-many multiplicity.
ManyToOne The ManyToOne annotation defines a single-valued association to another entity class that has many-to-one multiplicity.
MapKey The MapKey annotation is used to specify the map key for associations of type java.util.Map.
MappedSuperclass The MappedSuperclass annotation designates a class whose mapping information is applied to the entities that inherit from it.
NamedNativeQueries List of NamedNativeQuery objects.
NamedNativeQuery Used to specify a native SQL named query.
NamedQueries List of NamedQuery objects.
NamedQuery The NamedQuery annotation is used to specify a named query in the Java Persistence query language.
OneToMany A OneToMany annotation defines a many-valued association with one-to-many multiplicity.
OneToOne The OneToOne annotation defines a single-valued association to another entity that has one-to-one multiplicity.
OrderBy The OrderBy annotation specifies the ordering of the elements of a collection valued association at the point when the association is retrieved.
PersistenceContext The PersistenceContext annotation is used to express a dependency on a container-managed entity manager persistence context.
PersistenceContexts List of Persistence Contexts.
PersistenceProperty Property used by Persistence Context.
PersistenceUnit The PersistenceUnit annotation is used to express a dependency on an entity manager factory.
PersistenceUnits List of Persistence Units.
PostLoad Used to defined the PostLoad callback lifecycle.
PostPersist Used to defined the PostPersist callback lifecycle.
PostRemove Used to defined the PostRemove callback lifecycle.
PostUpdate Used to defined the PostUpdate callback lifecycle.
PrePersist Used to defined the PrePersist callback lifecycle.
PreRemove Used to defined the PreRemove callback lifecycle.
PreUpdate Used to defined the PreUpdate callback lifecycle.
PrimaryKeyJoinColumn The PrimaryKeyJoinColumn annotation specifies a primary key column that is used as a foreign key to join to another table.
The PrimaryKeyJoinColumn annotation is used to join the primary table of an entity subclass in the JOINED mapping strategy to the primary table of its superclass; it is used within a SecondaryTable annotation to join a secondary table to a primary table; and it may be used in a OneToOne mapping in which the primary key of the referencing entity is used as a foreign key to the referenced entity.
PrimaryKeyJoinColumns Composite foreign keys are supported by means of the PrimaryKeyJoinColumns annotation.
QueryHint Hint to use for a named query.
SecondaryTable The SecondaryTable annotation is used to specify a secondary table for the annotated entity class.
SecondaryTables The SecondaryTables annotation is used to specify multiple secondary tables for an entity.
SequenceGenerator The SequenceGenerator annotation defines a primary key generator that may be referenced by name when a generator element is specified for the GeneratedValue annotation.
SqlResultSetMapping Specifies the mapping of the result of a native SQL query.
SqlResultSetMappings List of SqlResultSetMapping.
Table The Table annotation specifies the primary table for the annotated entity.
TableGenerator The TableGenerator annotation defines a primary key generator that may be referenced by name when a generator element is specified for the GeneratedValue annotation.
Temporal The Temporal annotation must be specified for persistent fields or properties of type java.util.Date and java.util.Calendar.
Transient The Transient annotation is used to annotate a property or field of an entity class, mapped superclass, or embeddable class.
UniqueConstraint The UniqueConstraint annotation is used to specify that a unique constraint is to be included in the generated DDL for a primary or secondary table.
Version The Version annotation specifies the version field or property of an entity class that serves as its optimistic lock value.
 

Package javax.persistence Description

API used by EJB 3.0 container