Re: [appfuse-user] generics and DAO

2006-12-21 Thread Georg Henzler
Hi Luiz, You can't get the type of a generic type because the type information is lost in the bytecode. The probably best solution for your problem is to overload the method so you can either go getObject(myExample) or getObject(MyClass.class) to make this possible you have to make sure y

[appfuse-user] generics and DAO

2006-12-21 Thread Luiz Fernando Rodrigues
Hi, I was developing a generic method to get objects by example. The problem is that I have to inform the Class object, so I can search for all objects in case of a null parameter. Is it possible to get the object class from the generic type T? public List getObject(final T o, final Class claz