Home » Search

About EntityManager

81-90 of 200Refresh
Manual
14

JPA Lifecycle Events

(added to the EntityManager). @PostPersist - after storing a new entity in the database (during commit or ... - when an entity is identified as modified by the EntityManager. @PostUpdate - after updating an entity in ... the EntityManager. @PostRemove - after deleting an entity from the database (during commit or flush). An entity
Manual
14

Query Parameters in JPA

getCountryByName(EntityManager em, String name) { TypedQuery query = em.createQuery ... : public Country getCountryByName(EntityManager em, String name) { TypedQuery query = em ... without parameters: public Country getCountryByName(EntityManager em, String name
Tutorial
14

Step 3: Define an EJB Session Bean

; import java.util.List; import javax.ejb.Stateless; import javax.persistence.EntityManager; import ... class GuestDao { // Injected database connection: @PersistenceContext private EntityManager ... ). Prepares an EntityManager automatically and injects it into the em field (because it is annotated
Tutorial
14

Step 3: Define an EJB Session Bean

.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.TypedQuery ... : @PersistenceContext private EntityManager em; // Stores a new guest: public void persist(Guest guest ... shown in the next step). Prepares an EntityManager automatically and injects it into the em field
Issue
14

InternalException during EntityManager.find()

InternalException during EntityManager.find()
Manual
11

Entity Management Settings

the persistence context of the EntityManager (which serves as a first level cache). The valid values are "weak ... all its EntityManager instances. The level 2 cache is disabled by specifying 0 or 0mb. The element
Manual
11

JPA Metamodel API

by the EntityManager's getMetamodel method (both methods are equivalent). For example, given an EntityManager, em, a Metamodel instance can be obtained by: Metamodel metamodel = em.getMetamodel
Tutorial
11

Step 4: Add a Servlet Class

"); EntityManager em = emf.createEntityManager(); try { // Handle a new guest (if any ... is retrieved from the application scope attribute, and then an EntityManager (representing a database
Tutorial
11

Step 4: Add a Servlet Class

)getServletContext().getAttribute("emf"); EntityManager em = emf.createEntityManager ... , and then an EntityManager (representing a database connection) is constructed. If a new guest
Result
11

ObjectDB Object Database Features

and timeout. Caching L1 entity object cache (per EntityManager). L2 shared entity data cache ... on an EntityManager/PersistenceManager. Supports automatic download of created backups from the server