|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.knowledgeplaza.util.jpa.JpaUtil
nl.knowledgeplaza.util.jpa.EclipselinkUtil
public class EclipselinkUtil
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class nl.knowledgeplaza.util.jpa.JpaUtil |
|---|
JpaUtil.JpaEntityInformation |
| Field Summary | |
|---|---|
static String |
SOURCECODE_VERSION
Standard variable for determining version of a class file. |
| Constructor Summary | |
|---|---|
EclipselinkUtil()
|
|
| Method Summary | |
|---|---|
static org.eclipse.persistence.jpa.JpaEntityManager |
castToJpaEntityManager(javax.persistence.EntityManager entityManager)
Cast to JpaEntityManager, but first see if this is the EntityManagerExtender proxy |
static Number |
getNextSequenceNumberValue(javax.persistence.EntityManager entityManager,
Class clazz)
Allocate a new PK |
static org.eclipse.persistence.sessions.Session |
getSession(javax.persistence.EntityManager entityManager)
get Eclipselink's session from a generic entityManager This actually is quite trivial once you got a hold of Eclipselink's JpaEntityManager, but just to be convenient we're doing here for you. |
static Object |
getSingleResultOrDefault(javax.persistence.Query lQuery,
Object d)
getSingleResult throws an exception if nothing is found. |
static Object |
getSingleResultOrNull(javax.persistence.Query lQuery)
getSingleResult throws an exception if nothing is found. |
static org.eclipse.persistence.sessions.UnitOfWork |
getUnitOfWork(javax.persistence.EntityManager entityManager)
get Eclipselink's UnitOfWork from a generic entityManager This actually is quite trivial once you got a hold of Eclipselink's JpaEntityManager, but just to be convenient we're doing here for you. |
static void |
installEventListenerRouter(javax.persistence.EntityManagerFactory lEntityManagerFactory,
List<Class> entityClasses)
Install the EclipselinkDescriptorEventListenerRouter class as the Eclipselink event manager and forward to local methods |
| Methods inherited from class nl.knowledgeplaza.util.jpa.JpaUtil |
|---|
clear, clear, clear2ndLevelCache, close, close, collectEntityClasses, getJdbcConnection, mergeImmediately, mergeImmediately, persistImmediately, persistImmediately, persistImmediately, persistImmediately, removeImmediately, removeImmediately, stripEntityManager |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SOURCECODE_VERSION
| Constructor Detail |
|---|
public EclipselinkUtil()
| Method Detail |
|---|
public static Object getSingleResultOrNull(javax.persistence.Query lQuery)
lQuery -
public static Object getSingleResultOrDefault(javax.persistence.Query lQuery,
Object d)
lQuery -
public static org.eclipse.persistence.jpa.JpaEntityManager castToJpaEntityManager(javax.persistence.EntityManager entityManager)
entityManager -
public static org.eclipse.persistence.sessions.Session getSession(javax.persistence.EntityManager entityManager)
entityManager -
public static org.eclipse.persistence.sessions.UnitOfWork getUnitOfWork(javax.persistence.EntityManager entityManager)
entityManager -
public static Number getNextSequenceNumberValue(javax.persistence.EntityManager entityManager,
Class clazz)
entityManager - clazz -
public static void installEventListenerRouter(javax.persistence.EntityManagerFactory lEntityManagerFactory,
List<Class> entityClasses)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||