public class JpaHelper extends Object
Constructor and Description |
---|
JpaHelper() |
Modifier and Type | Method and Description |
---|---|
static jakarta.persistence.EntityManagerFactory |
createEntityManagerFactory(Server session)
Create a EclipseLink EMF given a ServerSession that has already been created
and logged in.
|
static jakarta.persistence.EntityManagerFactory |
createEntityManagerFactory(String sessionName)
Create a EclipseLink EMF using a session name and sessions.xml.
|
static jakarta.persistence.Query |
createQuery(DatabaseQuery query,
jakarta.persistence.EntityManager em)
Create a EclipseLink JPA query dynamically given a EclipseLink query.
|
static DatabaseQuery |
getDatabaseQuery(jakarta.persistence.Query query)
Access the internal EclipseLink query wrapped within the JPA query.
|
static DatabaseSession |
getDatabaseSession(jakarta.persistence.EntityManagerFactory emf)
Retrieve the shared database session from the EMF.
|
static JpaEntityManager |
getEntityManager(jakarta.persistence.EntityManager entityManager)
Convert a JPA entityManager into a EclipseLink specific one.
|
static JpaEntityManagerFactory |
getEntityManagerFactory(jakarta.persistence.EntityManager em)
Given an EntityManager return the EntityManagerFactory that created it.
|
static JpaEntityManagerFactory |
getEntityManagerFactory(jakarta.persistence.EntityManagerFactory emf)
Given a JPA EntityManagerFactory attempt to cast it to a EclipseLink EMF.
|
static org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl |
getEntityManagerFactory(org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl emf)
Deprecated.
|
static ReadAllQuery |
getReadAllQuery(jakarta.persistence.Query query)
Access the internal EclipseLink query wrapped within the JPA query.
|
static ReportQuery |
getReportQuery(jakarta.persistence.Query query)
Access the internal EclipseLink query wrapped within the JPA query.
|
static Server |
getServerSession(jakarta.persistence.EntityManagerFactory emf)
Retrieve the shared server session from the EMF.
|
static SessionBroker |
getSessionBroker(jakarta.persistence.EntityManagerFactory emf)
Retrieve the shared session broker from the EMF.
|
static boolean |
isEclipseLink(jakarta.persistence.EntityManager em)
Verify if the JPA provider is EclipseLink.
|
static boolean |
isEclipseLink(jakarta.persistence.EntityManagerFactory emf)
Verify if the JPA provider is EclipseLink
|
static boolean |
isEclipseLink(jakarta.persistence.Query query)
Verify if the JPA provider is EclipseLink
|
static boolean |
isReportQuery(jakarta.persistence.Query query)
Determine if the JPA query is a EclipseLink ReportQuery.
|
static void |
loadUnfetchedObject(FetchGroupTracker entity)
If the object has a fetch group then the whole object is read in.
|
public static boolean isEclipseLink(jakarta.persistence.EntityManager em)
public static boolean isEclipseLink(jakarta.persistence.EntityManagerFactory emf)
public static boolean isEclipseLink(jakarta.persistence.Query query)
public static boolean isReportQuery(jakarta.persistence.Query query)
public static ReportQuery getReportQuery(jakarta.persistence.Query query)
public static DatabaseQuery getDatabaseQuery(jakarta.persistence.Query query)
public static ReadAllQuery getReadAllQuery(jakarta.persistence.Query query)
public static jakarta.persistence.Query createQuery(DatabaseQuery query, jakarta.persistence.EntityManager em)
public static JpaEntityManager getEntityManager(jakarta.persistence.EntityManager entityManager)
@Deprecated public static org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl getEntityManagerFactory(org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl emf)
JpaEntityManagerFactory
public static JpaEntityManagerFactory getEntityManagerFactory(jakarta.persistence.EntityManagerFactory emf)
JpaEntityManagerFactory
public static JpaEntityManagerFactory getEntityManagerFactory(jakarta.persistence.EntityManager em)
JpaEntityManagerFactory
public static DatabaseSession getDatabaseSession(jakarta.persistence.EntityManagerFactory emf)
public static Server getServerSession(jakarta.persistence.EntityManagerFactory emf)
public static SessionBroker getSessionBroker(jakarta.persistence.EntityManagerFactory emf)
public static jakarta.persistence.EntityManagerFactory createEntityManagerFactory(Server session)
public static jakarta.persistence.EntityManagerFactory createEntityManagerFactory(String sessionName)
public static void loadUnfetchedObject(FetchGroupTracker entity)
Copyright © 2007–2020 Eclipse.org - EclipseLink Project. All rights reserved.