Hello everyone,

I have an application that groups different objects using a Category entity.
Of course, with Java5 Generics it is possible :

*********************** START CODE **********************************
public class Category<E extends BaseObject> extends BaseObject
{
        private String categoryName;

        private List<E> entidades;

        private Long id;

        private List<Category<E>> subCategories;

        ... getters, setters, hashcode, equals, toString
}
*********************** END CODE **********************************

However the Category Entity must be persisted via Hibernate.  This is where
I'm lost.

The only way I can think of resolving this is that the CAT table must be
connected to the Entities like this :

CAT --> CAT_ENTITY_1 -->  ENTITY_1
CAT --> CAT_ENTITY_2 -->  ENTITY_2
...
CAT --> CAT_ENTITY_N -->  ENTITY_N

Is my idea ok?, or does someone has another approach to the "Generic
Entity", or should I forget about the Generic
 entity ? 

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Generic-Entity%3A-Is-it-possible---tf3711054s2369.html#a10380380
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to