This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPA fetch with params

 
surlac surlacovich
Ranch Hand
Posts: 296
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Folks!
I need to create generic method to fetch from DB with JPA. It means it can receive parameters which will narrow the results down. The implementation that I have:

I'm just wondering, how to replace this boilerplate code? Is there any way where I can just write like this:

Usage:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic