Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DTOAssembler/Factory

 
roul ravashimka
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bhagvan Kommadi
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic