HQL switch to use criteria builder