This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes how to pass search criteria with DTO or JPA entity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "how to pass search criteria with DTO or JPA entity" Watch "how to pass search criteria with DTO or JPA entity" New topic
Author

how to pass search criteria with DTO or JPA entity

raj sirohi
Ranch Hand

Joined: Mar 02, 2010
Posts: 35
Hello,
Since DTO is a retired pattern, what is the best way to pass search critieria from web tier. before I would create a DTo and set its parameters in the web tier and pass it to the business tier for setting the parameters to namedquery, does it mean that now I can create a jpa entity and set its fields and pass it to business tier. is it ok?

thanks
raj

SCJP5.0 , SCBCD5.0, SCEA
Riyaz Enayath
Ranch Hand

Joined: Sep 01, 2009
Posts: 33

I think DTO + jpa named query is right selection for search functionality implmentation to avoid exposing jpa entity directly to web layer.
 
Have you checked out Aspose?
 
subject: how to pass search criteria with DTO or JPA entity
 
It's not a secret anymore!