Home » Search

About EntityManager

31-40 of 200Refresh
JPA Doc
49

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
49

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
49

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
49

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
49

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
49

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
49

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
JPA Doc
49

lock(entity, lockMode, properties)

Method javax.persistence.EntityManager void lock(   Object entity,   LockModeType lockMode,   Map properties ) Lock an entity instance that is contained in the persistence context with the specified lock mode type and with specified properties. If a pessimistic lock mode type
JPA Doc
49

merge(entity)

Method javax.persistence.EntityManager T merge(   T entity ) Merge the state of the given entity into the current persistence context. Parameters: entity - entity instance Returns: the managed instance that the state was merged to Throws: IllegalArgumentException - if instance is not an entity or
JPA Doc
49

persist(entity)

Method javax.persistence.EntityManager void persist(   Object entity ) Make an instance managed and persistent. Parameters: entity - entity instance Throws: EntityExistsException - if the entity already exists. (If the entity already exists, the EntityExistsException may be thrown when the persist