About EntityManager

1-10 of 200Refresh
JPA Doc
50

javax.persistence.EntityManager

javax.persistence Interface EntityManager Interface used to interact with the persistence context. An EntityManager instance is associated with a persistence context. A persistence context is a set ... . The EntityManager API is used to create and remove persistent entity instances, to find entities by their primary
JPA Doc
46

getDelegate()

Method javax.persistence.EntityManager Object getDelegate() Return the underlying provider object for the EntityManager, if available. The result of this method is implementation specific. The unwrap method is to be preferred for new applications. Returns: underlying provider object for EntityManager Since: JPA 1.0
JPA Doc
46

unwrap(cls)

Method javax.persistence.EntityManager T unwrap(   Class cls ) Return an object of the specified type to allow access to the provider-specific API. If the provider's EntityManager implementation ... of the object to be returned. This is normally either the underlying EntityManager implementation
JPA Doc
45

close()

Method javax.persistence.EntityManager void close() Close an application-managed entity manager. After the close method has been invoked, all methods on the EntityManager instance and any Query and TypedQuery objects obtained from it will throw the IllegalStateException except for getProperties
JPA Doc
45

refresh(entity, lockMode)

Method javax.persistence.EntityManager void refresh(   Object entity,   LockModeType lockMode ) Refresh the state of the instance from the database, overwriting changes made to the entity, if any ... on a container-managed EntityManager instance with PersistenceContextType.TRANSACTION or with a lock mode
JPA Doc
45

refresh(entity, lockMode, properties)

Method javax.persistence.EntityManager void refresh(   Object entity,   LockModeType lockMode,   Map properties ) Refresh the state of the instance from the database, overwriting ... -managed EntityManager instance with PersistenceContextType.TRANSACTION or with a lock mode
JPA Doc
44

clear()

Method javax.persistence.EntityManager void clear() Clear the persistence context, causing all managed entities to become detached. Changes made to entities that have not been flushed to the database will not be persisted. Since: JPA 1.0
JPA Doc
44

contains(entity)

Method javax.persistence.EntityManager boolean contains(   Object entity ) Check if the instance is a managed entity instance belonging to the current persistence context. Parameters: entity - entity instance Returns: boolean indicating if entity is in persistence context Throws: IllegalArgumentException - if not an entity Since: JPA 1.0
JPA Doc
44

createNamedQuery(name)

Method javax.persistence.EntityManager Query createNamedQuery(   String name ) Create an instance of Query for executing a named query (in the Java Persistence query language or in native SQL). Parameters: name - the name of a query defined in metadata Returns: the new query instance Throws
JPA Doc
44

createNamedQuery(name, resultClass)

Method javax.persistence.EntityManager TypedQuery createNamedQuery(   String name,   Class resultClass ) Create an instance of TypedQuery for executing a Java Persistence query language named query. The select list of the query must contain only a single item, which must be assignable