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

Class If

java.lang.Object
  └ com.moyosoft.exchange.search.If


public final class If

Utility class helping the creation of a restriction object used to search or filter Exchange items.

This class contains definitions for all Exchange item's fields. Each field can be used to apply a specific restriction criteria.

Example code showing possible usages of this class:

Restriction restriction = If.Item.Subject.startsWith("Test");



Restriction restriction =
  If.Message.Subject.startsWith("Test").or(
  If.Message.IsNotRead );




Date now = new Date();
Date oneDayAgo = new Date(now.getTime() - 86400000);

Restriction restriction =
  If.Item.DateTimeReceived.isAfterOrEqualTo(oneDayAgo).and().isBefore(now);



Restriction restriction =
  If.CalendarItem.Start.
    isAfterOrEqualTo(oneDayAgo).and().
    isBefore(now).and(
  If.CalendarItem.End.
    isAfterOrEqualTo(oneDayAgo).and().
    isBefore(now));

Methods

isNot (Restriction restriction)

Community comments



Powered by JavaDocPlus