RE: Representation<T> and Entity<T>

From: Jerome Louvel <>
Date: Tue, 10 Apr 2007 19:52:24 +0200


> I'm not aware of any way to do that, I'll investigate.


> ... and therefore its important to provide a way to specify this
> additional metadata. Again, I think the generic wrapper class is a
> better solution than requiring developers to define their own
> wrapper or subclasses whenever the metadata can't be statically inferred.

Expressed in this way and for this sole purpose, I don't have strong
objections. I would just suggest to not rely on this wrapper class for
default examples as it implies that this is the recommended way.

Looking more closely at Entity<T> and Representation<T>, I don't see the
need for Entity<T> interface. It also has the inconvenient of being fragile.
Once we have a first public version of it, we can't add any method without
breaking implementing classes (beside Representation that we control of

> We can define classes and/or annotations for common headers but I
> think we also need a general mechanism - I don't want to define an
> annotation for every possible HTTP header.

I fully agree.

Best regards,