Class SearchRequestAddendumBuilder

java.lang.Object
com.atlassian.jira.issue.search.util.SearchRequestAddendumBuilder

public class SearchRequestAddendumBuilder extends Object
Provides convenience methods to build new SearchRequest objects from existing ones, by appending additional clauses.
Since:
v6.0
  • Constructor Details

    • SearchRequestAddendumBuilder

      public SearchRequestAddendumBuilder()
  • Method Details

    • appendAndClause

      public static <T> SearchRequest appendAndClause(T value, SearchRequest searchRequest, SearchRequestAddendumBuilder.AddendumCallback<T> addendumCallback)
      Clones the query within the supplied SearchRequest and appends an AND clause to it, delegating to the supplied callback to provide the clause specifics.
      Type Parameters:
      T - The value type
      Parameters:
      value - The value to be added to the AND clause
      searchRequest - A SearchRequest containing the original query to be cloned and appended to
      addendumCallback - Provides the delegate methods for adding the clauses
      Returns:
      A SearchRequest containing the new query
    • appendAndNotClauses

      public static <T> SearchRequest appendAndNotClauses(Iterable<? extends T> values, SearchRequest searchRequest, SearchRequestAddendumBuilder.AddendumCallback<T> addendumCallback)
      Clones the query within the supplied SearchRequest and appends an AND NOT clause to it, delegating to the supplied callback to provide the clause specifics.
      Type Parameters:
      T - The value type
      Parameters:
      values - The values to be added to the AND NOT clause
      searchRequest - A SearchRequest containing the original query to be cloned and appended to
      addendumCallback - Provides the delegate methods for adding the clauses
      Returns:
      A SearchRequest containing the new query