|
Kodo 4.2.0. generated on July 28 2008 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.persistence.Persistence kodo.persistence.KodoPersistence
public class KodoPersistence
Redefines OpenJPA Persistence for backward compatibility with published Kodo-specific 4.0 API.
Field Summary |
---|
Fields inherited from class javax.persistence.Persistence |
---|
PERSISTENCE_PROVIDER, providers |
Constructor Summary | |
---|---|
KodoPersistence()
Deprecated. |
Method Summary | |
---|---|
static KodoEntityManager |
cast(EntityManager em)
Deprecated. Return the Kodo facade to the given entity manager. |
static KodoEntityManagerFactory |
cast(EntityManagerFactory emf)
Deprecated. Return the Kodo facade to the given entity manager factory. |
static KodoQuery |
cast(Query q)
Deprecated. Return the Kodo facade to the given query. |
static void |
close(Object o)
Deprecated. Close the given resource. |
static KodoEntityManagerFactory |
createEntityManagerFactory()
Deprecated. |
static KodoEntityManagerFactory |
createEntityManagerFactory(String unit)
Deprecated. |
static KodoEntityManagerFactory |
createEntityManagerFactory(String jndiLocation,
Context context)
Deprecated. Returns the EntityManagerFactory at the JNDI location specified
by jndiLocation in the context context . |
static KodoEntityManagerFactory |
createEntityManagerFactory(String unit,
Map properties)
Deprecated. |
static KodoEntityManagerFactory |
createEntityManagerFactory(String name,
String resource)
Deprecated. Returns a new KodoEntityManagerFactory specified by
name in an XML configuration file at the resource location
resource . |
static KodoEntityManagerFactory |
createEntityManagerFactory(String name,
String resource,
Map map)
Deprecated. Returns a new KodoEntityManagerFactory specified by
name in an XML configuration file at the resource location
resource , applying the properties specified in
map as overrides. |
static Object |
fromKodoObjectId(Object oid)
Deprecated. Translate from a Kodo identity object to a Persistence one. |
static Class |
fromKodoObjectIdClass(Class oidClass)
Deprecated. Translate from a Kodo identity class to a native one. |
static KodoEntityManager |
getEntityManager(Object o)
Deprecated. Return the entity manager for the given object, if one can be determined from just the object alone. |
static KodoEntityManagerFactory |
getEntityManagerFactory()
Deprecated. Returns the KodoEntityManagerFactory specified by
your Kodo defaults. |
static KodoEntityManagerFactory |
getEntityManagerFactory(Map map)
Deprecated. Returns the KodoEntityManagerFactory specified by
your Kodo defaults, using map as overrides. |
static ClassMetaData |
getMetaData(EntityManager em,
Class cls)
Deprecated. Returns the ClassMetaData associated with the
persistent type cls . |
static ClassMetaData |
getMetaData(EntityManagerFactory emf,
Class cls)
Deprecated. Returns the ClassMetaData associated with the
persistent type cls . |
static ClassMetaData |
getMetaData(Object o)
Deprecated. Returns the ClassMetaData associated with the
persistent object o . |
static boolean |
isManagedType(EntityManager em,
Class cls)
Deprecated. Returns true if the specified class is an entity or embeddable type. |
static boolean |
isManagedType(EntityManagerFactory emf,
Class cls)
Deprecated. Returns true if the specified class is an entity or embeddable type. |
static Broker |
toBroker(EntityManager em)
Deprecated. Return the underlying broker for the given entity manager facade. |
static BrokerFactory |
toBrokerFactory(EntityManagerFactory emf)
Deprecated. Return the underlying broker factory for the given entity manager factory facade. |
static KodoEntityManager |
toEntityManager(Broker broker)
Deprecated. Return a persistence manager facade to the given broker retaining previously associated persistence context type. |
static KodoEntityManagerFactory |
toEntityManagerFactory(BrokerFactory factory)
Deprecated. Return an entity manager factory facade to the given broker factory. |
static Object |
toKodoObjectId(ClassMetaData meta,
Object oid)
Deprecated. Translate from a Persistence identity object to a Kodo one. |
static Collection |
toKodoObjectIds(ClassMetaData meta,
Collection oids)
Deprecated. Return a collection of Kodo oids for the given native oid collection. |
static Object[] |
toKodoObjectIds(ClassMetaData meta,
Object... oids)
Deprecated. Return an array of Kodo oids for the given native oid array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KodoPersistence()
Method Detail |
---|
public static KodoEntityManagerFactory toEntityManagerFactory(BrokerFactory factory)
public static KodoEntityManager toEntityManager(Broker broker)
public static BrokerFactory toBrokerFactory(EntityManagerFactory emf)
public static Broker toBroker(EntityManager em)
public static KodoEntityManagerFactory cast(EntityManagerFactory emf)
public static KodoEntityManager cast(EntityManager em)
public static KodoQuery cast(Query q)
public static KodoEntityManagerFactory getEntityManagerFactory()
KodoEntityManagerFactory
specified by
your Kodo defaults. This method will return the same logical factory
for each invocation.
public static KodoEntityManagerFactory getEntityManagerFactory(Map map)
KodoEntityManagerFactory
specified by
your Kodo defaults, using map
as overrides. This method
will return the same logical factory for invocations with the same
overrides.
public static KodoEntityManagerFactory createEntityManagerFactory()
public static KodoEntityManagerFactory createEntityManagerFactory(String unit, Map properties)
public static KodoEntityManagerFactory createEntityManagerFactory(String unit)
public static KodoEntityManagerFactory createEntityManagerFactory(String name, String resource)
Returns a new KodoEntityManagerFactory
specified by
name
in an XML configuration file at the resource location
resource
. If name
is null
, uses
the first resource found in the specified location, regardless of the
name specified in the XML resource or the name of the jar that the
resource is contained in. If resource
is null
,
uses the spec-defined META-INF/persistence.xml
resource.
This method only resolves KodoEntityManagerFactory
instances.
public static KodoEntityManagerFactory createEntityManagerFactory(String name, String resource, Map map)
Returns a new KodoEntityManagerFactory
specified by
name
in an XML configuration file at the resource location
resource
, applying the properties specified in
map
as overrides. If name
is
null
, uses the first resource found in the specified
location, regardless of the name specified in the XML resource or the
name of the jar that the resource is contained in.
If resource
is null
, uses the spec-defined
META-INF/persistence.xml
resource.
This method only resolves KodoEntityManagerFactory
instances.
public static KodoEntityManagerFactory createEntityManagerFactory(String jndiLocation, Context context)
EntityManagerFactory
at the JNDI location specified
by jndiLocation
in the context context
. If
context
is null
,
new InitialContext()
will be used.
public static KodoEntityManager getEntityManager(Object o)
new
), or that were created through
OpenJPAEntityManager.createInstance(java.lang.Class)
.
public static ClassMetaData getMetaData(Object o)
ClassMetaData
associated with the
persistent object o
.
public static ClassMetaData getMetaData(EntityManager em, Class cls)
ClassMetaData
associated with the
persistent type cls
.
public static ClassMetaData getMetaData(EntityManagerFactory emf, Class cls)
ClassMetaData
associated with the
persistent type cls
.
public static void close(Object o)
public static boolean isManagedType(EntityManager em, Class cls)
public static boolean isManagedType(EntityManagerFactory emf, Class cls)
public static Object fromKodoObjectId(Object oid)
public static Object toKodoObjectId(ClassMetaData meta, Object oid)
public static Object[] toKodoObjectIds(ClassMetaData meta, Object... oids)
public static Collection toKodoObjectIds(ClassMetaData meta, Collection oids)
public static Class fromKodoObjectIdClass(Class oidClass)
|
Kodo 4.2.0. generated on July 28 2008 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |