-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate Entity classes as DTO classes
PostPosted: Wed Apr 04, 2012 3:04 am 
Newbie

Joined: Mon Mar 19, 2012 7:07 am
Posts: 2
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.