Hibernate and generics -


In Java, I had a class that had a payload of type P

  public class GenericStatus & lt; t & gt; {Private MyDateRange myDateRange; Private Tea Payload;  

Runtime t is called either a simple primitive integer or a value, where value is a square with 2 integers

  public class value implementation serializable {Private Ent adult; Private int kids;  

How can you deal with the loading / saving of Class GenericStatus Element? I have 2 classes that are using it

  Public class masterpricers implement serial jubil {// this.basePrice Price class is an example of the prices of Private Generic Stos = new Generic Stats (this .basePrice);  

and

  applies the public class masterstats serializable {// Roomkit is an int generic staus availstatus = new GenericStatus (roomCount);  

I continue to scratch my head, but I still can not find a suitable way to deal with the generic status of the hibernate point.

I would like to be able to save it. Masterpieces and Masterstats Classes GenericStatus Class is used to reduce duplicate code which will be with Masterstats and Masterpiece. Will I try to apply the relationship with heritage? Will it be easy to decide?

I keep scratched my head, but I still can not get it < / P>

The answer is simple: Generic entities can not be mapped.

What would I try to apply to relation with heritage? Will it be easy to decide?

That's what I want to do.


Comments