Interface JpaEntityManager

All Superinterfaces:
AutoCloseable, jakarta.persistence.EntityManager

public interface JpaEntityManager extends jakarta.persistence.EntityManager, AutoCloseable

Purpose: Defines the Interface for EclipseLink extensions to the EntityManager

See Also:
  • EntityManager
  • Method Summary

    Modifier and Type
    Method
    Description
    copy(Object entityOrEntities, AttributeGroup group)
    This method will return copy the passed entity using the passed AttributeGroup.
    jakarta.persistence.Query
    createDescriptorNamedQuery(String queryName, Class descriptorClass)
    This method will create a query object that wraps a EclipseLink Named Query.
    jakarta.persistence.Query
    createDescriptorNamedQuery(String queryName, Class descriptorClass, List argumentTypes)
    This method will create a query object that wraps a EclipseLink Named Query.
    jakarta.persistence.Query
    createQuery(Expression expression, Class entityClass)
    This method is used to create a query using a EclipseLink Expression for the entity class.
    jakarta.persistence.Query
    This method is used to create a query using a EclipseLink Call.
    jakarta.persistence.Query
    createQuery(Call call, Class entityClass)
    This method is used to create a query using a EclipseLink Call for the entity class.
    jakarta.persistence.Query
    This method is used to create a query using a EclipseLink DatabaseQuery.
    jakarta.persistence.Query
    This method is used to create a query using query by example.
    org.eclipse.persistence.internal.sessions.AbstractSession
    Return the underlying database session
    This method returns the current session to the requester.
    org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
    Return the underlying database session
    org.eclipse.persistence.internal.sessions.AbstractSession
    Return the member DatabaseSessionImpl that maps cls in session broker.
    Return the member ServerSession that maps cls in session broker.
    Return the name of member session that maps cls.
    Return the underlying server session
    This method will return a Session outside of a transaction and null within a transaction.
    Return the underlying session broker
    This method will return the transactional UnitOfWork during the transaction and null outside of the transaction.
    boolean
    Indicates whether the underlying session is a session broker.
    void
    load(Object entityOrEntities, AttributeGroup group)
    This method will load the passed entity or collection of entities using the passed AttributeGroup.

    Methods inherited from interface java.lang.AutoCloseable

    close

    Methods inherited from interface jakarta.persistence.EntityManager

    clear, close, contains, createEntityGraph, createEntityGraph, createNamedQuery, createNamedQuery, createNamedStoredProcedureQuery, createNativeQuery, createNativeQuery, createNativeQuery, createQuery, createQuery, createQuery, createQuery, createQuery, createStoredProcedureQuery, createStoredProcedureQuery, createStoredProcedureQuery, detach, find, find, find, find, flush, getCriteriaBuilder, getDelegate, getEntityGraph, getEntityGraphs, getEntityManagerFactory, getFlushMode, getLockMode, getMetamodel, getProperties, getReference, getTransaction, isJoinedToTransaction, isOpen, joinTransaction, lock, lock, merge, persist, refresh, refresh, refresh, refresh, remove, setFlushMode, setProperty, unwrap
  • Method Details

    • getActiveSession

      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.
    • getAbstractSession

      org.eclipse.persistence.internal.sessions.AbstractSession getAbstractSession()
      Return the underlying database session
    • getDatabaseSession

      org.eclipse.persistence.internal.sessions.DatabaseSessionImpl getDatabaseSession()
      Return the underlying database session
    • getServerSession

      ServerSession getServerSession()
      Return the underlying server session
    • getSessionBroker

      SessionBroker getSessionBroker()
      Return the underlying session broker
    • getMemberDatabaseSession

      org.eclipse.persistence.internal.sessions.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.
    • getMemberServerSession

      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.
    • getMemberSessionName

      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.
    • isBroker

      boolean isBroker()
      Indicates whether the underlying session is a session broker. Session broker implement composite persistence unit.
    • getUnitOfWork

      UnitOfWork getUnitOfWork()
      This method will return the transactional UnitOfWork during the transaction and null outside of the transaction.
    • getSession

      Session getSession()
      This method will return a Session outside of a transaction and null within a transaction.
    • createQuery

      jakarta.persistence.Query createQuery(Expression expression, Class entityClass)
      This method is used to create a query using a EclipseLink Expression for the entity class.
    • createQuery

      jakarta.persistence.Query createQuery(DatabaseQuery query)
      This method is used to create a query using a EclipseLink DatabaseQuery.
    • createQuery

      jakarta.persistence.Query createQuery(Call call)
      This method is used to create a query using a EclipseLink Call.
    • createQuery

      jakarta.persistence.Query createQuery(Call call, Class entityClass)
      This method is used to create a query using a EclipseLink Call for the entity class.
    • createQueryByExample

      jakarta.persistence.Query createQueryByExample(Object exampleObject)
      This method is used to create a query using query by example.
    • createDescriptorNamedQuery

      jakarta.persistence.Query createDescriptorNamedQuery(String queryName, Class descriptorClass)
      This method will create a query object that wraps a EclipseLink Named Query.
    • createDescriptorNamedQuery

      jakarta.persistence.Query createDescriptorNamedQuery(String queryName, Class descriptorClass, List argumentTypes)
      This method will create a query object that wraps a EclipseLink Named Query.
    • load

      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.
    • copy

      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.