org.hypergraphdb.type
Class JavaObjectMapper

java.lang.Object
  extended by org.hypergraphdb.type.JavaObjectMapper
All Implemented Interfaces:
HGGraphHolder, JavaTypeMapper

public class JavaObjectMapper
extends java.lang.Object
implements JavaTypeMapper


Constructor Summary
JavaObjectMapper()
           
 
Method Summary
 void addClass(java.lang.Class<?> c)
           
 void addClass(java.lang.String classname)
           
 HGAtomType defineHGType(java.lang.Class<?> javaClass, HGHandle typeHandle)
           Create a new HyperGraphDB type for the given Java class.
 HGAtomType getJavaBinding(HGHandle typeHandle, HGAtomType hgType, java.lang.Class<?> javaClass)
           Create a type wrapper for a given raw HyperGraphDB type.
 HGHandle getSuperSlot()
           
 void setHyperGraph(HyperGraph graph)
          During load time, set the HyperGraph instance to which this atom belongs.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaObjectMapper

public JavaObjectMapper()
Method Detail

getSuperSlot

public HGHandle getSuperSlot()

setHyperGraph

public void setHyperGraph(HyperGraph graph)
Description copied from interface: HGGraphHolder

During load time, set the HyperGraph instance to which this atom belongs.

Specified by:
setHyperGraph in interface HGGraphHolder

defineHGType

public HGAtomType defineHGType(java.lang.Class<?> javaClass,
                               HGHandle typeHandle)
Description copied from interface: JavaTypeMapper

Create a new HyperGraphDB type for the given Java class. The HGHandle of the type pre-created and provided as a parameter.

This method should return a brand new HGAtomType that will subsequently be saved as a type atom with handle typeHandle and associated with the javaClass class.

Specified by:
defineHGType in interface JavaTypeMapper
Returns:

getJavaBinding

public HGAtomType getJavaBinding(HGHandle typeHandle,
                                 HGAtomType hgType,
                                 java.lang.Class<?> javaClass)
Description copied from interface: JavaTypeMapper

Create a type wrapper for a given raw HyperGraphDB type. The type wrapper should work with the regular Java runtime instance of an atom and use the underlying HG type for actual storage and retrieval.

Specified by:
getJavaBinding in interface JavaTypeMapper
Returns:

addClass

public void addClass(java.lang.Class<?> c)

addClass

public void addClass(java.lang.String classname)