|
Hello,
i'm currently developing an application which my model has diferent kinds of id's (primary key), such as java.lang.Long, java.lang.String, and composite-key classes.
But i have an superclass of all the entities, called BaseEntity, and in this class i have a getId and setId, but having the id's of diferent types, do not allow me to use this superclass, specially in case of composite-key classes, because i'm using XDoclet2, and it assumes the method's returning type the class type of the composite-key, and in the case of my superclass BaseEntity, the returning type of the getId, is a Serializable.
Is there any patter to lead to this specific case?
Regards.
|