All Implemented Interfaces:
Search

public class OrSearch extends BinaryLogicalSearch
A search for a logical OR. Example:
         OrSearch search = new OrSearch();
         search.or(new SearchTerm("givenName", "Shane");
         search.or(new SearchTerm("surname", "Bowen");
         System.out.println(search.encode());
 

would result in: (("givenName:Shane") OR ("surname:Bowen")) This is inspired by the Spring LDAP OrFilter and adjusted for OData.

See Also:
  • Constructor Details

    • OrSearch

      public OrSearch()
  • Method Details

    • or

      public OrSearch or(Search query)
      Add a query to the OR expression
      Parameters:
      query - The query to or with the rest of the or:ed queries.
    • getLogicalOperator

      protected String getLogicalOperator()
      Description copied from class: BinaryLogicalSearch
      Implement this in subclass to return the logical operator, for example "and".
      Specified by:
      getLogicalOperator in class BinaryLogicalSearch
      Returns:
      the logical operator.