This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes JPA fetch with params Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "JPA fetch with params" Watch "JPA fetch with params" New topic
Author

JPA fetch with params

surlac surlacovich
Ranch Hand

Joined: Mar 12, 2013
Posts: 296

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:
 
jQuery in Action, 2nd edition
 
subject: JPA fetch with params
 
Similar Threads
Double Insert Oracle 11g / JPA / Swing
Please explain below queries in case of JPA @Inheritance(strategy=InheritanceType.JOINED)
In JPA OneToOne relationship how to insert only one side of the relation
Help with JPA
Query after JPA collective update not getting updates