|
EclipseLink 2.0.0, build 'v20091127-r5931' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.jpa.JpaHelper
public class JpaHelper
This sample illustrates the JPA helper methods that may be of use to EclipseLink customers attempting to leverage EclipseLink specific functionality.
Constructor Summary | |
---|---|
JpaHelper()
|
Method Summary | |
---|---|
static EntityManagerFactory |
createEntityManagerFactory(Server session)
Create a EclipseLink EMF given a ServerSession that has already been created and logged in. |
static org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl |
createEntityManagerFactory(java.lang.String sessionName)
Create a EclipseLink EMF using a session name and sessions.xml. |
static Query |
createQuery(DatabaseQuery query,
EntityManager em)
Create a EclipseLink JPA query dynamically given a EclipseLink query. |
static DatabaseQuery |
getDatabaseQuery(Query query)
Access the internal EclipseLink query wrapped within the JPA query. |
static JpaEntityManager |
getEntityManager(EntityManager entityManager)
Convert a JPA entityManager into a EclipseLink specific one. |
static org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl |
getEntityManagerFactory(EntityManagerFactory emf)
Given a JPA EntityManagerFactory attempt to cast it to a EclipseLink EMF. |
static ReadAllQuery |
getReadAllQuery(Query query)
Access the internal EclipseLink query wrapped within the JPA query. |
static ReportQuery |
getReportQuery(Query query)
Access the internal EclipseLink query wrapped within the JPA query. |
static Server |
getServerSession(EntityManagerFactory emf)
Retrieve the shared server session from the EMF. |
static boolean |
isEclipseLink(EntityManager em)
Verify if the JPA provider is EclipseLink. |
static boolean |
isEclipseLink(EntityManagerFactory emf)
Verify if the JPA provider is EclipseLink |
static boolean |
isEclipseLink(Query query)
Verify if the JPA provider is EclipseLink |
static boolean |
isReportQuery(Query query)
Determine if the JPA query is a EclipseLink ReportQuery. |
static void |
loadUnfetchedObject(java.lang.Object object)
Load/fetch the unfetched object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JpaHelper()
Method Detail |
---|
public static boolean isEclipseLink(EntityManager em)
public static boolean isEclipseLink(EntityManagerFactory emf)
public static boolean isEclipseLink(Query query)
public static boolean isReportQuery(Query query)
public static ReportQuery getReportQuery(Query query)
getReadAllQuery(javax.persistence.Query)
public static DatabaseQuery getDatabaseQuery(Query query)
public static ReadAllQuery getReadAllQuery(Query query)
public static Query createQuery(DatabaseQuery query, EntityManager em)
public static JpaEntityManager getEntityManager(EntityManager entityManager)
public static org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl getEntityManagerFactory(EntityManagerFactory emf)
public static Server getServerSession(EntityManagerFactory emf)
public static EntityManagerFactory createEntityManagerFactory(Server session)
public static org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl createEntityManagerFactory(java.lang.String sessionName)
public static void loadUnfetchedObject(java.lang.Object object)
|
EclipseLink 2.0.0, build 'v20091127-r5931' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |