Moyosoft Products | Services | Download | Contact us    
Java Bridge to Exchange
Products  >  Java Bridge to Exchange  >  API Reference    
API Reference
Overview  |  
Classic JavaDoc


public ItemsCollection restrict(Restriction restriction)

Creates a new collection restricted to items that matches the specified restriction criteria.

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"));

the restricted collection.

See Also:

ExchangeServiceException   if any errors occur during the communication with Exchange.

Community comments

Powered by JavaDocPlus