select and pegination in hql