• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to pass search criteria with DTO or JPA entity

 
raj sirohi
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Riyaz Enayath
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I think DTO + jpa named query is right selection for search functionality implmentation to avoid exposing jpa entity directly to web layer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic