Home » Search

About EntityManager

41-50 of 200Refresh
JPA Doc
45

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
45

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
45

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

refresh(entity)

Method javax.persistence.EntityManager void refresh(   Object entity ) Refresh the state of the instance from the database, overwriting changes made to the entity, if any. Parameters: entity - entity instance Throws: IllegalArgumentException - if the instance is not an entity or the entity is not
JPA Doc
45

refresh(entity, properties)

Method javax.persistence.EntityManager void refresh(   Object entity,   Map properties ) Refresh the state of the instance from the database, using the specified properties, and overwriting changes made to the entity, if any. If a vendor-specific property or hint is not recognized
JPA Doc
45

remove(entity)

Method javax.persistence.EntityManager void remove(   Object entity ) Remove the entity instance. Parameters: entity - entity instance Throws: IllegalArgumentException - if the instance is not an entity or is a detached entity TransactionRequiredException - if invoked on a container-managed entity
JPA Doc
45

setFlushMode(flushMode)

Method javax.persistence.EntityManager void setFlushMode(   FlushModeType flushMode ) Set the flush mode that applies to all objects contained in the persistence context. Parameters: flushMode - flush mode Since: JPA 1.0
JPA Doc
45

setProperty(propertyName, value)

Method javax.persistence.EntityManager void setProperty(   String propertyName,   Object value ) Set an entity manager property or hint. If a vendor-specific property or hint is not recognized, it is silently ignored. Parameters: propertyName - name of property or hint value - value for property or
Manual
39

Updating JPA Entity Objects

entity object from within an active transaction. No EntityManager's method is invoked to report
Manual
37

Obtaining a JPA Database Connection

In JPA a database connection is represented by the EntityManager interface. Therefore, in order to manipulate an ObjectDB database we need an EntityManager instance. Operations that modify database ... an EntityManager instance consists of two steps. First we need to obtain an instance