com.moyosoft.exchange.search
Class If

java.lang.Object
  extended by 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));


Nested Class Summary
static class If.CalendarItem
           
static class If.Contact
           
static class If.Item
           
static class If.Message
           
static class If.Task
           
 
Method Summary
static Restriction isNot(Restriction restriction)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isNot

public static Restriction isNot(Restriction restriction)