public class JPAFacadeHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
EM_KEY |
static String |
EMF_KEY |
Constructor and Description |
---|
JPAFacadeHelper() |
Modifier and Type | Method and Description |
---|---|
static Object |
fromOpenJPAObjectId(Object oid)
Translate from a OpenJPA identity object to a Persistence one.
|
static Class |
fromOpenJPAObjectIdClass(Class oidClass)
Translate from a OpenJPA identity class to a native one.
|
static ClassMetaData |
getMetaData(javax.persistence.EntityManager em,
Class cls)
Returns the
ClassMetaData associated
with the persistent type cls . |
static ClassMetaData |
getMetaData(javax.persistence.EntityManagerFactory emf,
Class cls)
Returns the
ClassMetaData associated
with the persistent type cls . |
static ClassMetaData |
getMetaData(Object o)
Returns the
ClassMetaData associated with
the persistent object o . |
static Broker |
toBroker(javax.persistence.EntityManager em)
Return the underlying broker for the given entity manager facade.
|
static BrokerFactory |
toBrokerFactory(javax.persistence.EntityManagerFactory emf)
Return the underlying broker factory for the given persistence manager
factory facade.
|
static OpenJPAEntityManager |
toEntityManager(Broker broker)
Return a persistence manager facade to the given broker retaining
previously associated persistence context type.
|
static OpenJPAEntityManagerFactory |
toEntityManagerFactory(BrokerFactory factory) |
static Object |
toOpenJPAObjectId(ClassMetaData meta,
Object oid)
Translate from a Persistence identity object to a OpenJPA one.
|
static Collection<Object> |
toOpenJPAObjectIds(ClassMetaData meta,
Collection<Object> oids)
Return a collection of OpenJPA oids for the given native oid collection.
|
static Object[] |
toOpenJPAObjectIds(ClassMetaData meta,
Object... oids)
Return an array of OpenJPA oids for the given native oid array.
|
public static final String EM_KEY
public static final String EMF_KEY
public static OpenJPAEntityManagerFactory toEntityManagerFactory(BrokerFactory factory)
public static BrokerFactory toBrokerFactory(javax.persistence.EntityManagerFactory emf)
public static OpenJPAEntityManager toEntityManager(Broker broker)
public static Broker toBroker(javax.persistence.EntityManager em)
public static ClassMetaData getMetaData(Object o)
ClassMetaData
associated with
the persistent object o
.public static ClassMetaData getMetaData(javax.persistence.EntityManager em, Class cls)
ClassMetaData
associated
with the persistent type cls
.public static ClassMetaData getMetaData(javax.persistence.EntityManagerFactory emf, Class cls)
ClassMetaData
associated
with the persistent type cls
.public static Object fromOpenJPAObjectId(Object oid)
public static Object toOpenJPAObjectId(ClassMetaData meta, Object oid)
public static Object[] toOpenJPAObjectIds(ClassMetaData meta, Object... oids)
public static Collection<Object> toOpenJPAObjectIds(ClassMetaData meta, Collection<Object> oids)
Copyright © 2006–2019 Apache Software Foundation. All rights reserved.