users@jersey.java.net

Re: [Jersey] Resource Subclass

From: testn <test1_at_doramail.com>
Date: Fri, 26 Jun 2009 03:11:40 -0700 (PDT)

Ahh ic. I think in C#, they have the same problem in .NET 1.1. They resolved
this problem by define something like [XmlArray(Of Type)] to indicate the
return type of the method call.


Paul Sandoz wrote:
>
>
> 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.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>
>

-- 
View this message in context: http://n2.nabble.com/Resource-Subclass-tp3160169p3160707.html
Sent from the Jersey mailing list archive at Nabble.com.