|
Kodo 4.0.0 generated on May 15 2006 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.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 kodo.kernel.LockLevels |
---|
LOCK_NONE, LOCK_READ, LOCK_WRITE |
Constructor Summary | |
---|---|
KodoJDOHelper()
|
Method Summary | |
---|---|
static KodoDataStoreCache |
cast(javax.jdo.datastore.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 javax.jdo.datastore.Sequence |
getFieldSequence(Object o,
String fieldName)
Returns a Sequence for the generated values of the specified
field. |
static javax.jdo.datastore.Sequence |
getIdentitySequence(Object o)
Returns a 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. |
static int |
getLockLevel(Object o)
Return the lock level of the specified object. |
static kodo.meta.ClassMetaData |
getMetaData(Object o)
Returns the ClassMetaData associated with the type of the given
object. |
static kodo.meta.ClassMetaData |
getMetaData(PersistenceManager pm,
Class cls)
Returns the ClassMetaData associated with the
persistent type cls . |
static kodo.meta.ClassMetaData |
getMetaData(PersistenceManagerFactory pmf,
Class cls)
Returns the ClassMetaData associated with the
persistent type cls . |
static KodoPersistenceManagerFactory |
getPersistenceManagerFactory()
Returns a PersistenceManagerFactory configured based on
your system defaults. |
static void |
setDetachedState(Object o,
Object state)
Set the detached state of the specified object. |
static kodo.kernel.Broker |
toBroker(PersistenceManager pm)
Return the underlying broker for the given persistence manager facade. |
static kodo.kernel.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(kodo.kernel.Broker broker)
Return a persistence manager facade to the given broker. |
static KodoPersistenceManagerFactory |
toPersistenceManagerFactory(kodo.kernel.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(kodo.kernel.BrokerFactory factory)
public static kodo.kernel.BrokerFactory toBrokerFactory(PersistenceManagerFactory pmf)
public static KodoPersistenceManager toPersistenceManager(kodo.kernel.Broker broker)
public static kodo.kernel.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(javax.jdo.datastore.DataStoreCache cache)
public static KodoPersistenceManagerFactory getPersistenceManagerFactory()
PersistenceManagerFactory
configured based on
your system defaults.
public static kodo.meta.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 kodo.meta.ClassMetaData getMetaData(PersistenceManager pm, Class cls)
ClassMetaData
associated with the
persistent type cls
.
public static kodo.meta.ClassMetaData getMetaData(PersistenceManagerFactory pmf, Class cls)
ClassMetaData
associated with the
persistent type cls
.
public static javax.jdo.datastore.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 javax.jdo.datastore.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.0.0 generated on May 15 2006 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |