Package javax.mail.search

Examples of javax.mail.search.OrTerm


            String searchString = (String) ctx.get("param:" + "search");
            if (searchString == null) {
                searchString = "";
            }
            searchTerm = new OrTerm(
                    new SubjectTerm(searchString),
                    new FromStringTerm(searchString));

            // build searchTerm from searchTermString
View Full Code Here


            String searchString = (String) ctx.get("param:" + "search");
            if (searchString == null) {
                searchString = "";
            }
            searchTerm = new OrTerm(
                    new SubjectTerm(searchString),
                    new FromStringTerm(searchString));

            // build searchTerm from searchTermString
View Full Code Here

        if (term == null) {
            term = newTerm;
        } else if (op == Op.and) {
            term = new AndTerm(term, newTerm);
        } else if (op == Op.or) {
            term = new OrTerm(term, newTerm);
        } else {
            // need to and the existing with the not
            term = new AndTerm(term, new NotTerm(newTerm));
        }
    }
View Full Code Here

        if( type.equalsIgnoreCase( "not" ) ) {
          st = new NotTerm( parseChildSearchTerm( terms ) );
        } else if( type.equalsIgnoreCase( "and" ) ) {
          st = new AndTerm( parseChildSearchTerms( terms ) );
        } else if( type.equalsIgnoreCase( "or" ) ) {
          st = new OrTerm( parseChildSearchTerms( terms ) );
        } else if( type.equalsIgnoreCase( "from" ) ) {
          st = parseFromTerm( terms );
        } else if( type.equalsIgnoreCase( "subject" ) ) {
          st = parseSubjectTerm( terms );
        } else if( type.equalsIgnoreCase( "body" ) ) {
View Full Code Here

            String searchString = (String) ctx.get("param:" + "search");
            if (searchString == null) {
                searchString = "";
            }
            searchTerm = new OrTerm(
                    new SubjectTerm(searchString),
                    new FromStringTerm(searchString));

            // build searchTerm from searchTermString
View Full Code Here

            String searchString = (String) ctx.get("param:" + "search");
            if (searchString == null) {
                searchString = "";
            }
            searchTerm = new OrTerm(
                    new SubjectTerm(searchString),
                    new FromStringTerm(searchString));

            // build searchTerm from searchTermString
View Full Code Here

    for (int i = 0; i < searchFields.length; i++) {
      terms[i] = createSearchTerm( searchFields[i], searchValues );
    }

    if ( searchFields.length > 1 ) {
      return new OrTerm( terms );
    }
    else {
      return terms[0];
    }
  }
View Full Code Here

            String searchString = (String) ctx.get("param:" + "search");
            if (searchString == null) {
                searchString = "";
            }
            searchTerm = new OrTerm(
                    new SubjectTerm(searchString),
                    new FromStringTerm(searchString));

            // build searchTerm from searchTermString
View Full Code Here

          filter().to("to")

      );

    SearchTerm expected =
        new OrTerm(
          new FromStringTerm("from"),
          new RecipientStringTerm(Message.RecipientType.TO, "to")
        );

    assertEquals(expected, emailFilter.searchTerm);
View Full Code Here

      filter().or()
          .from("from")
          .to("to");

    SearchTerm expected =
        new OrTerm(
          new FromStringTerm("from"),
          new RecipientStringTerm(Message.RecipientType.TO, "to")
        );

    assertEquals(expected, emailFilter.searchTerm);
View Full Code Here

TOP

Related Classes of javax.mail.search.OrTerm

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.