Honestly, I see no problems with your current approach if your requests are simple and straightforward.
Usually, at least in my team, choosing to use HQL vs Criteria is more likely "preferred." HQL is more like SQL, and you can write more concise code. The criteria look more OO for some developers.
In my case, I tend to use HQL because it allows me to write much shorter and cleaner code for complex queries (again, this is really a matter of preference, I think). Nevertheless, the criterion can be very useful, because it allows me to build query conditions on the go of the entire batch much easier than HQL, here is a very simple example: -
public void doIt(String s1, String s2, String s3){ ... if () { crit.add(Restrictions.eq("s1", s1)); } if () { crit.add(Restrictions.like("s2", s2 + "%")); } if () { crit.add(Restrictions.ne("s3", s3)); } return crit.list(); }
Imagine if you want to do something like this in HQL, you will have to dynamically build the HQL query string on the fly, which can make the code a little unpleasant to read.
source share