Home » Search

About EntityManager

81-90 of 200Refresh
Manual
15

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
15

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
15

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
Manual
12

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
12

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
12

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
12

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
12

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
Manual
12

SELECT clause (JPQL / Criteria API)

The ability to retrieve managed entity objects is a major advantage of JPQL. For example, the following query returns Country objects that become managed by the EntityManager em: TypedQuery ... are not associated with an EntityManager and changes to them when a transaction is active are not
Manual
8

JPA Criteria API Queries

the EntityManagerFactory's getCriteriaBuilder method or by the EntityManager's getCriteriaBuilder method