Top Description Methods
org.eclipse.persistence.jpa

public Interface JpaEntityManager

extends EntityManager, AutoCloseable
Known Direct Implementers
org.eclipse.persistence.internal.jpa.EntityManagerImpl
Imports
java.util.List, org.eclipse.persistence.queries.AttributeGroup, .Call, .DatabaseQuery, org.eclipse.persistence.sessions.*, org.eclipse.persistence.expressions.Expression, org.eclipse.persistence.internal.sessions.AbstractSession, .DatabaseSessionImpl, org.eclipse.persistence.sessions.broker.SessionBroker, org.eclipse.persistence.sessions.server.ServerSession

Purpose: Defines the Interface for EclipseLink extensions to the EntityManager

See Also
jakarta.persistence.EntityManager

Method Summary

Modifier and TypeMethod and Description
public Object
copy(Object entityOrEntities, AttributeGroup group)

This method will return copy the passed entity using the passed AttributeGroup.

public Query
createDescriptorNamedQuery(String queryName, Class<?> descriptorClass)

This method will create a query object that wraps a EclipseLink Named Query.

public Query
createDescriptorNamedQuery(String queryName, Class<?> descriptorClass, List<E> argumentTypes)

This method will create a query object that wraps a EclipseLink Named Query.

public Query
createQuery(Expression expression, Class<?> entityClass)

This method is used to create a query using a EclipseLink Expression for the entity class.

public Query
createQuery(DatabaseQuery query)

This method is used to create a query using a EclipseLink DatabaseQuery.

public Query
createQuery(Call call)

This method is used to create a query using a EclipseLink Call.

public Query
createQuery(Call call, Class<?> entityClass)

This method is used to create a query using a EclipseLink Call for the entity class.

public Query
createQueryByExample(Object exampleObject)

This method is used to create a query using query by example.

public AbstractSession
getAbstractSession()

Return the underlying database session

public Session
getActiveSession()

This method returns the current session to the requester.

public DatabaseSessionImpl
getDatabaseSession()

Return the underlying database session

public AbstractSession
getMemberDatabaseSession(Class<?> cls)

Return the member DatabaseSessionImpl that maps cls in session broker.

public ServerSession
getMemberServerSession(Class<?> cls)

Return the member ServerSession that maps cls in session broker.

public String
getMemberSessionName(Class<?> cls)

Return the name of member session that maps cls.

public ServerSession
getServerSession()

Return the underlying server session

public Session
getSession()

This method will return a Session outside of a transaction and null within a transaction.

public SessionBroker
getSessionBroker()

Return the underlying session broker

public UnitOfWork
getUnitOfWork()

This method will return the transactional UnitOfWork during the transaction and null outside of the transaction.

public boolean
isBroker()

Indicates whether the underlying session is a session broker.

public void
load(Object entityOrEntities, AttributeGroup group)

This method will load the passed entity or collection of entities using the passed AttributeGroup.

Inherited from jakarta.persistence.EntityManager:
clearclosecontainscreateEntityGraphcreateEntityGraphcreateNamedQuerycreateNamedQuerycreateNamedStoredProcedureQuerycreateNativeQuerycreateNativeQuerycreateNativeQuerycreateQuerycreateQuerycreateQuerycreateQuerycreateQuerycreateStoredProcedureQuerycreateStoredProcedureQuerycreateStoredProcedureQuerydetachfindfindfindfindflushgetCriteriaBuildergetDelegategetEntityGraphgetEntityGraphsgetEntityManagerFactorygetFlushModegetLockModegetMetamodelgetPropertiesgetReferencegetTransactionisJoinedToTransactionisOpenjoinTransactionlocklockmergepersistrefreshrefreshrefreshrefreshremovesetFlushModesetPropertyunwrap
Inherited from java.lang.AutoCloseable:
close

Method Detail

copyback to summary
public Object copy(Object entityOrEntities, AttributeGroup group)

This method will return copy the passed entity using the passed AttributeGroup. In case of collection all members should be either entities of the same type or have a common inheritance hierarchy mapped root class. The AttributeGroup should correspond to the entity type.

createDescriptorNamedQueryback to summary
public Query createDescriptorNamedQuery(String queryName, Class<?> descriptorClass)

This method will create a query object that wraps a EclipseLink Named Query.

createDescriptorNamedQueryback to summary
public Query createDescriptorNamedQuery(String queryName, Class<?> descriptorClass, List<E> argumentTypes)

This method will create a query object that wraps a EclipseLink Named Query.

createQueryback to summary
public Query createQuery(Expression expression, Class<?> entityClass)

This method is used to create a query using a EclipseLink Expression for the entity class.

createQueryback to summary
public Query createQuery(DatabaseQuery query)

This method is used to create a query using a EclipseLink DatabaseQuery.

createQueryback to summary
public Query createQuery(Call call)

This method is used to create a query using a EclipseLink Call.

createQueryback to summary
public Query createQuery(Call call, Class<?> entityClass)

This method is used to create a query using a EclipseLink Call for the entity class.

createQueryByExampleback to summary
public Query createQueryByExample(Object exampleObject)

This method is used to create a query using query by example.

getAbstractSessionback to summary
public AbstractSession getAbstractSession()

Return the underlying database session

getActiveSessionback to summary
public Session getActiveSession()

This method returns the current session to the requester. The current session will be the active UnitOfWork within a transaction and will be a 'scrap' UnitOfWork outside of a transaction. The caller is concerned about the results then the getSession() or getUnitOfWork() API should be called.

getDatabaseSessionback to summary
public DatabaseSessionImpl getDatabaseSession()

Return the underlying database session

getMemberDatabaseSessionback to summary
public AbstractSession getMemberDatabaseSession(Class<?> cls)

Return the member DatabaseSessionImpl that maps cls in session broker. Return null if either not a session broker or cls is not mapped. Session broker implement composite persistence unit.

getMemberServerSessionback to summary
public ServerSession getMemberServerSession(Class<?> cls)

Return the member ServerSession that maps cls in session broker. Return null if either not a session broker or cls is not mapped. Session broker implement composite persistence unit.

getMemberSessionNameback to summary
public String getMemberSessionName(Class<?> cls)

Return the name of member session that maps cls. Return null if either not a session broker or cls is not mapped. Session broker implement composite persistence unit.

getServerSessionback to summary
public ServerSession getServerSession()

Return the underlying server session

getSessionback to summary
public Session getSession()

This method will return a Session outside of a transaction and null within a transaction.

getSessionBrokerback to summary
public SessionBroker getSessionBroker()

Return the underlying session broker

getUnitOfWorkback to summary
public UnitOfWork getUnitOfWork()

This method will return the transactional UnitOfWork during the transaction and null outside of the transaction.

isBrokerback to summary
public boolean isBroker()

Indicates whether the underlying session is a session broker. Session broker implement composite persistence unit.

loadback to summary
public void load(Object entityOrEntities, AttributeGroup group)

This method will load the passed entity or collection of entities using the passed AttributeGroup. In case of collection all members should be either entities of the same type or have a common inheritance hierarchy mapped root class. The AttributeGroup should correspond to the entity type.