To create the restriction criteria, use the class If. This class allows criteria to be specified on item's fields and creates the Restriction object.
Example code matching items with a Subject that starts with "Test":
ItemsCollection items = ...;
items = items.restrict(If.Item.Subject.startsWith("Test"));
|if any errors occur during the communication with Exchange.|
Powered by JavaDocPlus