replaced  deprecated criteria Expression with Restriction