I generated, with netbeans 6.8, session beans for my jpa entity classes.
The generated session beans are very likely similar to the dao classes in jpa context.
In the means, they include methods for CRUD operations.
Netbeans generates a session bean for each entity class. That means, if I want to modify a global behavior of a specific method, I have to run on all the classes.
The content methods are all very the same, except each session class is dedicated to the correspondent session bean.
I think of doing a parent session class, that accepts a generic entity class, that contains all the redundant implementation (CRUD).
The question is:
Anyway I can know the class type of the generic entity?
It's like doing dynamic class casting.