users@jersey.java.net

Re: [Jersey] Resource Subclass

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 26 Jun 2009 10:20:06 +0200

On Jun 26, 2009, at 10:00 AM, testn wrote:

>
> after digging more,
>
> @GET
> @Produces({"application/xml", "application/json"})
> public T getAll() {
> return (T) this.getJpaTemplate().find("from
> "+clazz.getName()).get(0);
> }
> works in the base class... but not this...
>

Yes, i forgot about that, Jersey does resolve T, the type variable to
a Class or a concrete ParameterizedType in this case. For the case of
List<T> etc it is more difficult to support this in a general manner,
but i suppose it could be done, just a bit of a head scratcher...

Paul.