View Javadoc

1   package com.atlassian.user.search.query;
2   
3   import java.util.List;
4   
5   /**
6    * Allows for the booleanconjuction of {@link Query} objects with an AND or OR parameter.
7    *
8    * For example, the results of query1 could be ANDED with query2 on the condition that their equality.
9    *
10   * TODO - consider an exclusion clause - the results of query1 could be excluded from the results of query2
11   */
12  
13  public interface BooleanQuery extends Query
14  {
15      public static final String AND = "&";
16      public static final String OR = "|";
17  
18      /**
19       * It is impossible for isAND() and isOR() to both return true or false.
20       *
21       * @return true if the clause is set to AND the two queries.
22       */
23      boolean isAND();
24  
25      /**
26       * @return true if the clause is set to OR the two queries
27       */
28      boolean isOR();
29  
30      List getQueries();
31  }