Hi, I am planning to use Hibernate for implementing persistence layer in our project.
Possible clients of our project: Java based, Mobile based(iPhone, iPad), Java-Web based(Spring-MVC)
As we use simple pojos with annotations as entity classes in hibernate, we want to use these same entity classes as DTO classes (we want to avoid new classes for DTO and conversion between DTO & Entity classes).
So how can we hide annotation information from clients? We want to have two sets of compiled classes for these same entity classes. One set should not have hibernate annotation information which we want to provide as a jar file to clients. The other set we want to use on server side should have annotation information. Is there a way to implement this?
Thanks, Chiru
|