I've got some code, which I would like to reuse. The only difference
between the usages are the class names and therefore the different
objects. How would you manage this? Is there a way to take the class
names as strings? Do you know other solutions, a suitable pattern, for
example?
Thanks for your answer, I read the thread, but this did not really
help me. It's not just about redefining some core methods. I think,
the description of my problem was not clear enough, sorry for this. I
would appreciate, if you could have a look at the following
explanation.
I've got several entities saved in my database: E1, E2 ... En. All
these entities can be flexibly annotated, so I've got the following
models:
E1 (Entity) => The entity itself
EA1 (EntityAnnotation) => The various entity annotations, may be
nested