org.datanucleus.store.neodatis
Class NeoDatisUtils

java.lang.Object
  extended by org.datanucleus.store.neodatis.NeoDatisUtils

public class NeoDatisUtils
extends java.lang.Object

Utilities for NeoDatis (http://www.neodatis.org).


Constructor Summary
NeoDatisUtils()
           
 
Method Summary
static java.lang.Object getIdentityForObject(java.lang.Object obj, org.datanucleus.metadata.AbstractClassMetaData acmd, org.datanucleus.ObjectManager om, org.neodatis.odb.ODB odb)
          Convenience method to return the (DataNucleus) identity for an object.
static org.datanucleus.StateManager prepareNeoDatisObjectForUse(java.lang.Object obj, org.datanucleus.ObjectManager om, org.neodatis.odb.ODB odb, org.datanucleus.metadata.AbstractClassMetaData cmd, NeoDatisManager mgr)
          Convenience method to take an object returned by NeoDatis (from a query for example), and prepare it for passing to the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NeoDatisUtils

public NeoDatisUtils()
Method Detail

prepareNeoDatisObjectForUse

public static org.datanucleus.StateManager prepareNeoDatisObjectForUse(java.lang.Object obj,
                                                                       org.datanucleus.ObjectManager om,
                                                                       org.neodatis.odb.ODB odb,
                                                                       org.datanucleus.metadata.AbstractClassMetaData cmd,
                                                                       NeoDatisManager mgr)
Convenience method to take an object returned by NeoDatis (from a query for example), and prepare it for passing to the user. Makes sure there is a StateManager connected, with all fields marked as loaded.

Parameters:
obj - The object (from NeoDatis)
om - ObjectManager
odb - ODB that returned the object
cmd - ClassMetaData for the object
mgr - NeoDatisManager
Returns:
The StateManager for this object

getIdentityForObject

public static java.lang.Object getIdentityForObject(java.lang.Object obj,
                                                    org.datanucleus.metadata.AbstractClassMetaData acmd,
                                                    org.datanucleus.ObjectManager om,
                                                    org.neodatis.odb.ODB odb)
Convenience method to return the (DataNucleus) identity for an object.

Parameters:
obj - The object
acmd - MetaData for the object
om - ObjectManager
odb - ODB to use
Returns:
The DataNucleus identity


Copyright © 2009. All Rights Reserved.