public class DefaultJavaTypeMapper extends Object implements JavaTypeMapper
| Constructor and Description |
|---|
DefaultJavaTypeMapper() |
| Modifier and Type | Method and Description |
|---|---|
HGAtomType |
defineHGType(Class<?> javaClass,
HGHandle typeHandle)
Create a new HyperGraphDB type for the given Java class.
|
HGAtomType |
getJavaBinding(HGHandle typeHandle,
HGAtomType hgType,
Class<?> javaClass)
Create a type wrapper for a given raw HyperGraphDB type.
|
static boolean |
includeProperty(Class<?> javaClass,
PropertyDescriptor desc) |
void |
setHyperGraph(HyperGraph graph)
During load time, set the
HyperGraph
instance to which this atom belongs. |
public static boolean includeProperty(Class<?> javaClass, PropertyDescriptor desc)
public HGAtomType defineHGType(Class<?> javaClass, HGHandle typeHandle)
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. The method should return null in
case it cannot (or it determines that it should not) create a HGAtomType.
In the case the JavaTypeFactory will move on to try the next of the registered
type mappers.
defineHGType in interface JavaTypeMapperHGAtomType corresponding to the passed in Java
class or null if such a type could not be created.public HGAtomType getJavaBinding(HGHandle typeHandle, HGAtomType hgType, Class<?> javaClass)
JavaTypeMapperCreate 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.
getJavaBinding in interface JavaTypeMappertypeHandle - The handle of the type being wrapped.hgType - The HyperGraphDB type instance to be wrappedjavaClass - The Java class corresponding to this HyperGraphDB type.null ifpublic void setHyperGraph(HyperGraph graph)
HGGraphHolderDuring load time, set the HyperGraph
instance to which this atom belongs.
setHyperGraph in interface HGGraphHolderCopyright © 2015. All rights reserved.