2.8. EntityManager

entitymanager

The diagram above presents an overview of the EntityManager interface. For a complete treatment of the EntityManager API, see the Javadoc documentation. Methods whose parameter signatures consist of an ellipsis (…​) are overloaded to take multiple parameter types.

Note

OpenJPA extends the standard EntityManager interface with the org.apache.openjpa.persistence.OpenJPAEntityManager interface to provide additional functionality.

The EntityManager is the primary interface used by application developers to interact with the JPA runtime. The methods of the EntityManager can be divided into the following functional categories:

  • Transaction association.

  • Entity lifecycle management.

  • Entity identity management.

  • Cache management.

  • Query factory.

  • Entity locking.

  • Closing.