com.moyosoft.exchange.search
Class If
java.lang.Object
com.moyosoft.exchange.search.If
public final class If
- extends java.lang.Object
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 inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isNot
public static Restriction isNot(Restriction restriction)