Meaningless Drivel is fun!*
The moose likes OO, Patterns, UML and Refactoring and the fly likes DTOAssembler/Factory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "DTOAssembler/Factory" Watch "DTOAssembler/Factory" New topic
Author

DTOAssembler/Factory

roul ravashimka
Ranch Hand

Joined: Mar 16, 2004
Posts: 53
hi,
can i use a dtoAssembler to return all values from one table in my database as a 'big dto', or return the values of a find-method. Which means wrap multiple rows as one object.
Or is an assembler only used to get data from 2,3,... different tables of a database which is related to eachother and combine it as composite DTO. Or in other words, combine one row of each database to one big object.
Or doesn't it matter?

Thanks,
Roul


MSc Electronics, ICT
Bhagvan Kommadi
Ranch Hand

Joined: Oct 15, 2001
Posts: 36
hi,
If you want to return a large set of rows from a table, what you need is Value List Handler.
Check out the details at :
http://java.sun.com/blueprints/corej2eepatterns/Patterns/ValueListHandler.html
roul ravashimka
Ranch Hand

Joined: Mar 16, 2004
Posts: 53
hi,
what's the difference of a dto assembler and a value list handler? They both produce a composite DTO, but a value list handler executes the query on a database, by using a DAO.
BTW, is a Fast lane reader the same as a value list handler?
Thanks,
Roul
Rufus BugleWeed
Ranch Hand

Joined: Feb 22, 2002
Posts: 1551
I think if you want all the data in a table you would return a collection of DTO. DTO is an encapsulation of the state of an object. It's meant to avoid the performance hit of getting state in a distributed application.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DTOAssembler/Factory
 
Similar Threads
DTO Assembler pattern methods
DTO Assembler pattern
DTO Assembler pattern methods
getting data from 2 tables using 2 DTOs
DAO and Entity class