Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to convert from EJB to DTO

Bjorn Stove
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi developers.
I need some help how to populate my dto.
I have more than one EJB that have the same property, because
of I sometimes have to get value from a view and sometimes
from a table.
For example property, Integer articleType.
I want to convert this integer into something meaningful
in the view.(String object saying something meaningful) Do I have to put a method converting this in every SessionFacade or dto for the corresponding EJB? Or is the best practise to make articleType its own datatype in
a class and let that class handle all the convertion, and
put that datatype into the dto?
Little bit confused about the best approach.
Best Regards
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic