Package javax.mail.search

Examples of javax.mail.search.ReceivedDateTerm


    public MailsSinceLastCheckFilter(Date date) {
      since = date;
    }

    public SearchTerm getCustomSearch(Folder folder) {
      return new ReceivedDateTerm(ComparisonTerm.GE, since);
    }
View Full Code Here


    public SearchTermBuilder received(Comparison comparison, Date date) {
        return received(Op.and, comparison, date);
    }

    public SearchTermBuilder received(Op op, Comparison comparison, Date date) {
        ReceivedDateTerm st = new ReceivedDateTerm(comparison.asNum(), date);
        addTerm(op, st);
        return this;
    }
View Full Code Here

    try {
      SimpleDateFormat sdf = new SimpleDateFormat( format );
     
      Date date = sdf.parse( value );
     
      st = new ReceivedDateTerm( cp, date );
    }
    catch( ParseException pe ) {
      throw( new XPathException(this, "Cannot parse date value: " + value + ", using format: " + format + ", for term with type: " + ((Element)terms).getAttribute( "type" ) ) );
    }
   
View Full Code Here

TOP

Related Classes of javax.mail.search.ReceivedDateTerm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.