TRUNK-4098:Replace deprecated method "Expression" with "Restrictions"

https://tickets.openmrs.org/browse/TRUNK-4098