I don't think this is a good idea to directly transform Java code
including hibernate annotations or to restore Java code from a database
because:
- once the transformation is done if you want to generate code from EMF
then you will loose many critical mapping information in your java code.
- EMF doesn't support JDK 6 annotations. I mean that you can create java
code but no Hibernate annotations.
- The model transformation to EMF will only capture some information of
the code and not the full logic. I mean that the EMF reverse engineering
from Hibernate doesn't really exist and you will have to create your own
parser. The complexity and the usability of such a reverse requires more
than 18 months full time investment and then few years of testing :-)
The Ecore and EMF transformation complexity have already been hidden by
EclipseUML. It means that you can use Ecore and EMF but you don't have to
redo all the job Omondo has already done. This is why you have to pay for
the tool :-)