|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JavaTypeMapper
A JavaTypeMapper is used to create HyperGraphDB type out of Java classes and
to provide appropriate run-time representations.
When the type an atom of an unknown Java class is first requested, the type system must
create an appropriate HyperGraphDB type using Java reflection on the class. The HyperGraphDB
type should be portable and potentially usable from other languages such as C++. For example
a plain Java bean is usually translated into the general RecordType.
The HyperGraphDB type, being general, doesn't have to necessarily create objects of the original Java class. In other words
| Method Summary | |
|---|---|
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. |
| Methods inherited from interface org.hypergraphdb.HGGraphHolder |
|---|
setHyperGraph |
| Method Detail |
|---|
HGAtomType defineHGType(java.lang.Class<?> javaClass,
HGHandle typeHandle)
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.
javaClass - typeHandle -
HGAtomType getJavaBinding(HGHandle typeHandle,
HGAtomType hgType,
java.lang.Class<?> javaClass)
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.
typeHandle - hgType - javaClass -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||