Kodo 4.2.0. (DEPRECATED)

kodo.persistence
Class KodoPersistence

java.lang.Object
  extended by javax.persistence.Persistence
      extended by kodo.persistence.KodoPersistence

Deprecated.

public class KodoPersistence
extends Persistence

Redefines OpenJPA Persistence for backward compatibility with published Kodo-specific 4.0 API.

Since:
4.0

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

KodoPersistence

public KodoPersistence()
Deprecated. 
Method Detail

toEntityManagerFactory

public static KodoEntityManagerFactory toEntityManagerFactory(BrokerFactory factory)
Deprecated. 
Return an entity manager factory facade to the given broker factory.


toEntityManager

public static KodoEntityManager toEntityManager(Broker broker)
Deprecated. 
Return a persistence manager facade to the given broker retaining previously associated persistence context type.


toBrokerFactory

public static BrokerFactory toBrokerFactory(EntityManagerFactory emf)
Deprecated. 
Return the underlying broker factory for the given entity manager factory facade.


toBroker

public static Broker toBroker(EntityManager em)
Deprecated. 
Return the underlying broker for the given entity manager facade.


cast

public static KodoEntityManagerFactory cast(EntityManagerFactory emf)
Deprecated. 
Return the Kodo facade to the given entity manager factory.


cast

public static KodoEntityManager cast(EntityManager em)
Deprecated. 
Return the Kodo facade to the given entity manager.


cast

public static KodoQuery cast(Query q)
Deprecated. 
Return the Kodo facade to the given query.


getEntityManagerFactory

public static KodoEntityManagerFactory getEntityManagerFactory()
Deprecated. 
Returns the KodoEntityManagerFactory specified by your Kodo defaults. This method will return the same logical factory for each invocation.


getEntityManagerFactory

public static KodoEntityManagerFactory getEntityManagerFactory(Map map)
Deprecated. 
Returns the KodoEntityManagerFactory specified by your Kodo defaults, using map as overrides. This method will return the same logical factory for invocations with the same overrides.


createEntityManagerFactory

public static KodoEntityManagerFactory createEntityManagerFactory()
Deprecated. 

createEntityManagerFactory

public static KodoEntityManagerFactory createEntityManagerFactory(String unit,
                                                                  Map properties)
Deprecated. 

createEntityManagerFactory

public static KodoEntityManagerFactory createEntityManagerFactory(String unit)
Deprecated. 

createEntityManagerFactory

public 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. 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.


createEntityManagerFactory

public 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. 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.


createEntityManagerFactory

public static KodoEntityManagerFactory createEntityManagerFactory(String jndiLocation,
                                                                  Context context)
Deprecated. 
Returns the EntityManagerFactory at the JNDI location specified by jndiLocation in the context context. If context is null, new InitialContext() will be used.


getEntityManager

public static KodoEntityManager getEntityManager(Object o)
Deprecated. 
Return the entity manager for the given object, if one can be determined from just the object alone. This method will succeed for instances that are enhanced, that were loaded from the database (rather than being constructed with new), or that were created through OpenJPAEntityManager.createInstance(java.lang.Class).


getMetaData

public static ClassMetaData getMetaData(Object o)
Deprecated. 
Returns the ClassMetaData associated with the persistent object o.


getMetaData

public static ClassMetaData getMetaData(EntityManager em,
                                        Class cls)
Deprecated. 
Returns the ClassMetaData associated with the persistent type cls.


getMetaData

public static ClassMetaData getMetaData(EntityManagerFactory emf,
                                        Class cls)
Deprecated. 
Returns the ClassMetaData associated with the persistent type cls.


close

public static void close(Object o)
Deprecated. 
Close the given resource. The resource can be an extent iterator, query result, large result set relation, or any closeable Kodo component.


isManagedType

public static boolean isManagedType(EntityManager em,
                                    Class cls)
Deprecated. 
Returns true if the specified class is an entity or embeddable type.


isManagedType

public static boolean isManagedType(EntityManagerFactory emf,
                                    Class cls)
Deprecated. 
Returns true if the specified class is an entity or embeddable type.


fromKodoObjectId

public static Object fromKodoObjectId(Object oid)
Deprecated. 
Translate from a Kodo identity object to a Persistence one.


toKodoObjectId

public static Object toKodoObjectId(ClassMetaData meta,
                                    Object oid)
Deprecated. 
Translate from a Persistence identity object to a Kodo one.


toKodoObjectIds

public static Object[] toKodoObjectIds(ClassMetaData meta,
                                       Object... oids)
Deprecated. 
Return an array of Kodo oids for the given native oid array.


toKodoObjectIds

public static Collection toKodoObjectIds(ClassMetaData meta,
                                         Collection oids)
Deprecated. 
Return a collection of Kodo oids for the given native oid collection.


fromKodoObjectIdClass

public static Class fromKodoObjectIdClass(Class oidClass)
Deprecated. 
Translate from a Kodo identity class to a native one.


Kodo 4.2.0. (DEPRECATED)

Copyright 2011 Oracle, Inc. All Rights Reserved.

This documentation is deprecated and will be removed in the next release of WebLogic Server.


Oracle Fusion Middleware Oracle Kodo 4.2.0 API Reference (DEPRECATED)
11g Release 1 (10.3.6)
Part Number E13950-02