| 
 | 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.Objectjavax.jdo.JDOHelper
kodo.jdo.KodoJDOHelper
public class KodoJDOHelper
Static helper methods for JDO users, including switching between Kodo native and JDO APIs.
| Field Summary | |
|---|---|
| static String | PM_KEY | 
| static String | PMF_KEY | 
| Fields inherited from interface org.apache.openjpa.kernel.LockLevels | 
|---|
| LOCK_NONE, LOCK_READ, LOCK_WRITE | 
| Constructor Summary | |
|---|---|
| KodoJDOHelper() | |
| Method Summary | |
|---|---|
| static KodoDataStoreCache | cast(DataStoreCache cache)Return the Kodo facade to the given cache. | 
| static KodoExtent | cast(Extent e)Return the Kodo facade to the given extent. | 
| static KodoFetchPlan | cast(FetchPlan fetch)Return the Kodo facade to the given fetch plan. | 
| static KodoPersistenceManager | cast(PersistenceManager pm)Return the Kodo facade to the given entity manager. | 
| static KodoPersistenceManagerFactory | cast(PersistenceManagerFactory pmf)Return the Kodo facade to the given persistence manager factory. | 
| static KodoQuery | cast(Query q)Return the Kodo facade to the given query. | 
| static void | close(Object o)Close the given resource. | 
| static Object | fromKodoObjectId(Object oid)Translate from a Kodo identity object to a JDO one. | 
| static Class | fromKodoObjectIdClass(Class cls)Translate from a Kodo identity class to a JDO one. | 
| static Object | getDetachedState(Object o)Return the detached state of the specified object, or null if none. | 
| static Sequence | getFieldSequence(Object o,
                 String fieldName)Returns a Sequencefor the generated values of the specified
 field. | 
| static Sequence | getIdentitySequence(Object o)Returns a Sequencefor the datastore identity values of the
 specified instance, or null if the object is unmanaged or its identity
 cannot be represented by a sequence. | 
| static int | getLockLevel(Object o)Return the lock level of the specified object. | 
| static ClassMetaData | getMetaData(Object o)Returns the ClassMetaDataassociated with the type of the given
 object. | 
| static ClassMetaData | getMetaData(PersistenceManager pm,
            Class cls)Returns the ClassMetaDataassociated with the
 persistent typecls. | 
| static ClassMetaData | getMetaData(PersistenceManagerFactory pmf,
            Class cls)Returns the ClassMetaDataassociated with the
 persistent typecls. | 
| static KodoPersistenceManagerFactory | getPersistenceManagerFactory()Returns a PersistenceManagerFactoryconfigured based on
 your system defaults. | 
| static void | setDetachedState(Object o,
                 Object state)Set the detached state of the specified object. | 
| static Broker | toBroker(PersistenceManager pm)Return the underlying broker for the given persistence manager facade. | 
| static BrokerFactory | toBrokerFactory(PersistenceManagerFactory pmf)Return the underlying broker factory for the given persistence manager factory facade. | 
| static Object | toKodoObjectId(Object oid,
               PersistenceManager pm)Translate from a JDO identity object to a Kodo one. | 
| static Collection | toKodoObjectIds(Collection oids,
                PersistenceManager pm)Return a collection of Kodo oids for the given native oid collection. | 
| static Object[] | toKodoObjectIds(Object[] oids,
                PersistenceManager pm)Return an array of Kodo oids for the given native oid array. | 
| static KodoPersistenceManager | toPersistenceManager(Broker broker)Return a persistence manager facade to the given broker. | 
| static KodoPersistenceManagerFactory | toPersistenceManagerFactory(BrokerFactory factory)Return a persistence manager factory facade to the given broker factory. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final String PMF_KEY
public static final String PM_KEY
| Constructor Detail | 
|---|
public KodoJDOHelper()
| Method Detail | 
|---|
public static KodoPersistenceManagerFactory toPersistenceManagerFactory(BrokerFactory factory)
public static BrokerFactory toBrokerFactory(PersistenceManagerFactory pmf)
public static KodoPersistenceManager toPersistenceManager(Broker broker)
public static Broker toBroker(PersistenceManager pm)
public static KodoPersistenceManagerFactory cast(PersistenceManagerFactory pmf)
public static KodoPersistenceManager cast(PersistenceManager pm)
public static KodoQuery cast(Query q)
public static KodoExtent cast(Extent e)
public static KodoFetchPlan cast(FetchPlan fetch)
public static KodoDataStoreCache cast(DataStoreCache cache)
public static KodoPersistenceManagerFactory getPersistenceManagerFactory()
PersistenceManagerFactory configured based on
 your system defaults.
public static ClassMetaData getMetaData(Object o)
ClassMetaData associated with the type of the given
 object. Returns null if o is null, or is not
 managed.
public static ClassMetaData getMetaData(PersistenceManager pm,
                                        Class cls)
ClassMetaData associated with the
 persistent type cls.
public static ClassMetaData getMetaData(PersistenceManagerFactory pmf,
                                        Class cls)
ClassMetaData associated with the
 persistent type cls.
public static Sequence getIdentitySequence(Object o)
Sequence for the datastore identity values of the
 specified instance, or null if the object is unmanaged or its identity
 cannot be represented by a sequence.
public static Sequence getFieldSequence(Object o,
                                        String fieldName)
Sequence for the generated values of the specified
 field.  The instance must be managed.
public static Object getDetachedState(Object o)
public static void setDetachedState(Object o,
                                    Object state)
public static int getLockLevel(Object o)
public static void close(Object o)
public static Object fromKodoObjectId(Object oid)
public static Object toKodoObjectId(Object oid,
                                    PersistenceManager pm)
public static Object[] toKodoObjectIds(Object[] oids,
                                       PersistenceManager pm)
public static Collection toKodoObjectIds(Collection oids,
                                         PersistenceManager pm)
public static Class fromKodoObjectIdClass(Class cls)
| 
 | 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 | ||||||||