Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

DTO Builder

  Asked By: Frankie    Date: Oct 22    Category: Java    Views: 1084
  

I'm using DTO as a means of passing parameters from my web layer to business layer. I want to use Ant to build DTOs automatically from database tables(Oracle 10g) .Does anyone have the source code for a DTO builder?

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Olga Kates     Answered On: Oct 22

if you have Oracle JDeveloper it builds DTO and JPA Entity beans from tables for you

 
Answer #2    Answered By: Milind Mishra     Answered On: Oct 22

All DTOs cannot be built from database.
But if you mean domain object or entity objects, yes, Hibernate has a tool(Search for it in google).
You can use domain objects as DTOs and inside DTOs.
For the projects that need high reusablity at the domain objects, it is bad practice to produce objects from database. You need to design your domain objects and then map them to a persistence tier if you need to persist them.
But if you have a big legacy system it could be a good approach.

 
Didn't find what you were looking for? Find more on DTO Builder Or get search suggestion and latest updates.




Tagged: