Replaced deprecated Hibernate class Expression with Restrictions class.