Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

DTOAssembler/Factory

 
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
 
Author
Posts: 75
5
  • 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
 
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.
 
Have you no shame? Have you no decency? Have you no tiny ad?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic