org.apache.camel.component.mail
Class NowSearchTerm

java.lang.Object
  extended by javax.mail.search.SearchTerm
      extended by javax.mail.search.ComparisonTerm
          extended by org.apache.camel.component.mail.NowSearchTerm
All Implemented Interfaces:
Serializable

public class NowSearchTerm
extends javax.mail.search.ComparisonTerm

A SearchTerm that is based on DateTerm that compares with current date (eg now).

This allows to compare with a dynamic derived value.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.mail.search.ComparisonTerm
EQ, GE, GT, LE, LT, NE
 
Constructor Summary
NowSearchTerm(int comparison, boolean sentDate, long offset)
          Constructor
 
Method Summary
 boolean equals(Object o)
           
 int hashCode()
           
 boolean match(javax.mail.Message msg)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NowSearchTerm

public NowSearchTerm(int comparison,
                     boolean sentDate,
                     long offset)
Constructor

Parameters:
comparison - the comparison operator
sentDate - true for using sent date, false for using received date.
offset - an optional offset as delta from now, can be a positive or negative value, for example to say within last 24 hours.
See Also:
ComparisonTerm
Method Detail

match

public boolean match(javax.mail.Message msg)
Specified by:
match in class javax.mail.search.SearchTerm

equals

public boolean equals(Object o)
Overrides:
equals in class javax.mail.search.ComparisonTerm

hashCode

public int hashCode()
Overrides:
hashCode in class javax.mail.search.ComparisonTerm


Apache Camel