This week's book giveaway is in the Performance forum. We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line! See this thread for details.
I was working on some JPA code here at CodeRanch. There's a lot of boilerplate code in using the Criteria API so I wanted to do something about that before creating a second use of it. Anything in here that is wrong/could be better? It does compile and run correctly. I just find it hard to believe this is the best way of using the API. And I couldn't find anything better to express the common code in the middle. I want to be able to call multiple Criterias from different methods in the same DAO so I was stuck with the anonymous inner class.