aspose file tools*
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: 31

I think DTO + jpa named query is right selection for search functionality implmentation to avoid exposing jpa entity directly to web layer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to pass search criteria with DTO or JPA entity
 
Similar Threads
SCEA 2/1 - Transfer Object Pattern question.
Passing Serilizable JPA Entity from EJB to Web Tier
How to pass the DTO to the dao implementention layer
regarding SLSB and ThreadLocals
Pass JPA entities across tiers?