Changing native queries to CriteriaQuery II