Home » Search

About EntityManager

31-40 of 200Refresh
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
JPA Doc
44

getTransaction()

Method javax.persistence.EntityManager EntityTransaction getTransaction() Return the resource-level EntityTransaction object. The EntityTransaction instance may be used serially to begin and commit multiple transactions. Returns: EntityTransaction instance Throws: IllegalStateException - if invoked on a JTA entity manager Since: JPA 1.0
JPA Doc
44

isOpen()

Method javax.persistence.EntityManager boolean isOpen() Determine whether the entity manager is open. Returns: true until the entity manager has been closed Since: JPA 1.0
JPA Doc
44

joinTransaction()

Method javax.persistence.EntityManager void joinTransaction() Indicate to the entity manager that a JTA transaction is active. This method should be called on a JTA application managed entity manager that was created outside the scope of the active transaction to associate it with the current JTA
JPA Doc
44

lock(entity, lockMode)

Method javax.persistence.EntityManager void lock(   Object entity,   LockModeType lockMode ) Lock an entity instance that is contained in the persistence context with the specified lock mode type. If a pessimistic lock mode type is specified and the entity contains a version attribute