Use Criteria Builder style or plain text style queries and use setMaxResults or getSingleResult to retrieve an entity containing a column with "from" in the name.
Configure hibernate to show generated sql, and notice that ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) as _hibernate_row_nr_ is inserted in the SQL just before the "from" portion of the column name.