Top Description Methods
org.eclipse.persistence.jpa

public Interface JpaEntityManagerFactory

extends EntityManagerFactory, AutoCloseable
Known Direct Implementers
org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate, org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl
Imports
jakarta.persistence.EntityManagerFactory, java.util.Map, org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate, org.eclipse.persistence.internal.sessions.DatabaseSessionImpl, org.eclipse.persistence.sessions.broker.SessionBroker, org.eclipse.persistence.sessions.server.ServerSession

Purpose: Defines the Interface for EclipseLink extensions to the EntityManagerFactory

See Also
jakarta.persistence.EntityManagerFactory

Method Summary

Modifier and TypeMethod and Description
public DatabaseSessionImpl
getDatabaseSession()

Returns the DatabaseSession that the Factory will be using and initializes it if it is not available.

public ServerSession
getServerSession()

Returns the ServerSession that the Factory will be using and initializes it if it is not available.

public SessionBroker
getSessionBroker()

Returns the SessionBroker that the Factory will be using and initializes it if it is not available.

public void
refreshMetadata(Map<String, Object> properties)

As this EntityManagerFactory to refresh itself.

public EntityManagerFactoryDelegate
unwrap()

Gets the underlying implementation of the EntityManagerFactory.

Inherited from jakarta.persistence.EntityManagerFactory:
addNamedEntityGraphaddNamedQueryclosecreateEntityManagercreateEntityManagercreateEntityManagercreateEntityManagergetCachegetCriteriaBuildergetMetamodelgetPersistenceUnitUtilgetPropertiesisOpenunwrap
Inherited from java.lang.AutoCloseable:
close

Method Detail

getDatabaseSessionback to summary
public DatabaseSessionImpl getDatabaseSession()

Returns the DatabaseSession that the Factory will be using and initializes it if it is not available.

getServerSessionback to summary
public ServerSession getServerSession()

Returns the ServerSession that the Factory will be using and initializes it if it is not available.

getSessionBrokerback to summary
public SessionBroker getSessionBroker()

Returns the SessionBroker that the Factory will be using and initializes it if it is not available. Calls to this method should only be made on entity managers representing composite persistence units.

refreshMetadataback to summary
public void refreshMetadata(Map<String, Object> properties)

As this EntityManagerFactory to refresh itself. This will cause the underlying EntityManagerFactory implementation to be dropped and a new one to be bootstrapped. Existing EntityManagers will continue to use the old implementation

unwrapback to summary
public EntityManagerFactoryDelegate unwrap()

Gets the underlying implementation of the EntityManagerFactory. This method will return a version of EntityManagerFactory that is based on the available metadata at the time it is called. Future calls to refresh will not affect that metadata on this EntityManagerFactory.