Persist a template class

6 views
Skip to first unread message

BGrabiel

unread,
Oct 4, 2010, 8:12:58 AM10/4/10
to jo4neo
Hello,

Is it possible to persist a template class? I've tried and I've this
error while the persist operation :
java.lang.ClassCastException:
sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast
to java.lang.reflect.ParameterizedType
at jo4neo.impl.FieldContext.type2(FieldContext.java:166)
at jo4neo.impl.FieldContext.isPluralPrimitive(FieldContext.java:158)
at jo4neo.impl.PersistOperation.save(PersistOperation.java:61)
at jo4neo.impl.PersistOperation.save(PersistOperation.java:53)
at jo4neo.impl.PersistOperation.save(PersistOperation.java:36)
at jo4neo.impl.ObjectGraphImpl.persist(ObjectGraphImpl.java:43)

Many thanks,


Bat

Taylor Cowan

unread,
Oct 5, 2010, 7:30:48 PM10/5/10
to jo4...@googlegroups.com
Do you mean an abstract or interface class? What is a template class?

Sent from my HTC

BGrabiel

unread,
Oct 6, 2010, 3:16:09 AM10/6/10
to jo4neo
A class that looks like :

public class Member<T> {
private T id;

...

Taylor Cowan

unread,
Oct 6, 2010, 6:16:14 PM10/6/10
to jo4...@googlegroups.com
:-) thanks, as you can tell I haven't been spending as much time as I
used to coding Java. I'll make some test cases and try and fix this,
it's a bug, and I want it to work

BGrabiel

unread,
Oct 7, 2010, 3:10:51 AM10/7/10
to jo4neo
ok, Thnaks . Let me know when you'll have fixed this problem.

Anyway, what is your plan for the futur version of jo4neo?

On 7 oct, 00:16, Taylor Cowan <thewebseman...@gmail.com> wrote:
> :-) thanks, as you can tell I haven't been spending as much time as I
> used to coding Java.  I'll make some test cases and try and fix this,
> it's a bug, and I want it to work
>

Taylor Cowan

unread,
Oct 7, 2010, 1:11:42 PM10/7/10
to jo4...@googlegroups.com
I'd like to put a 1.0 on it. To that end your help is appreciated in
pointing out these gaps.

But I also want to make sure the tool is understood as a way to build
a graph...it's a simple object persistence tool, the idea is to make
it easier to built a graph from java objects. Template classes are
1st class members of Java and I believe that's definetely something it
should support.

Taylor

Reply all
Reply to author
Forward
0 new messages