About EntityManager

21-30 of 200Refresh
JPA Doc
44

find(entityClass, primaryKey, lockMode, properties)

Method javax.persistence.EntityManager T find(   Class entityClass,   Object primaryKey,   LockModeType lockMode,   Map properties ) Find by primary key and lock, using the specified properties. Search for an entity of the specified class and primary key and lock it with respect
JPA Doc
44

find(entityClass, primaryKey, properties)

Method javax.persistence.EntityManager T find(   Class entityClass,   Object primaryKey,   Map properties ) Find by primary key, using the specified properties. Search for an entity of the specified class and primary key. If the entity instance is contained in the persistence
JPA Doc
44

flush()

Method javax.persistence.EntityManager void flush() Synchronize the persistence context to the underlying database. Throws: TransactionRequiredException - if there is no transaction PersistenceException - if the flush fails Since: JPA 1.0
JPA Doc
44

getCriteriaBuilder()

Method javax.persistence.EntityManager CriteriaBuilder getCriteriaBuilder() Return an instance of CriteriaBuilder for the creation of CriteriaQuery objects. Returns: CriteriaBuilder instance Throws: IllegalStateException - if the entity manager has been closed Since: JPA 2.0
JPA Doc
44

getEntityManagerFactory()

Method javax.persistence.EntityManager EntityManagerFactory getEntityManagerFactory() Return the entity manager factory for the entity manager. Returns: EntityManagerFactory instance Throws: IllegalStateException - if the entity manager has been closed Since: JPA 2.0
JPA Doc
44

getFlushMode()

Method javax.persistence.EntityManager FlushModeType getFlushMode() Get the flush mode that applies to all objects contained in the persistence context. Returns: flushMode Since: JPA 1.0
JPA Doc
44

getLockMode(entity)

Method javax.persistence.EntityManager LockModeType getLockMode(   Object entity ) Get the current lock mode for the entity instance. Parameters: entity - entity instance Returns: lock mode Throws: TransactionRequiredException - if there is no transaction IllegalArgumentException - if the instance
JPA Doc
44

getMetamodel()

Method javax.persistence.EntityManager Metamodel getMetamodel() Return an instance of Metamodel interface for access to the metamodel of the persistence unit. Returns: Metamodel instance Throws: IllegalStateException - if the entity manager has been closed Since: JPA 2.0
JPA Doc
44

getProperties()

Method javax.persistence.EntityManager Map getProperties() Get the properties and hints and associated values that are in effect for the entity manager. Changing the contents of the map does not change the configuration in effect. Returns: map of properties and hints in effect for entity manager Since: JPA 2.0
JPA Doc
44

getReference(entityClass, primaryKey)

Method javax.persistence.EntityManager T getReference(   Class entityClass,   Object primaryKey ) Get an instance, whose state may be lazily fetched. If the requested instance does not exist in the database, the EntityNotFoundException is thrown when the instance state is first accessed