Class Combine

java.lang.Object
com.atlassian.crowd.search.builder.Combine

public class Combine extends Object
Builder for MultiTermRestrictions. For usage see QueryBuilder.
  • Constructor Details

    • Combine

      public Combine()
  • Method Details

    • anyOf

      public static BooleanRestriction anyOf(SearchRestriction... restrictions)
      Returns an OR boolean search restriction where only one or more of the search restrictions have to be satisfied.
      Parameters:
      restrictions - search restrictions
      Returns:
      OR boolean search restriction
    • allOf

      public static BooleanRestriction allOf(SearchRestriction... restrictions)
      Returns an AND boolean search restriction where all of the search restrictions have to be satisfied.
      Parameters:
      restrictions - search restrictions
      Returns:
      AND boolean search restriction
    • anyOf

      public static BooleanRestriction anyOf(Collection<? extends SearchRestriction> restrictions)
      Returns an OR boolean search restriction where only one or more of the search restrictions have to be satisfied.
      Parameters:
      restrictions - search restrictions
      Returns:
      OR boolean search restriction
    • allOf

      public static BooleanRestriction allOf(Collection<? extends SearchRestriction> restrictions)
      Returns an AND boolean search restriction where all of the search restrictions have to be satisfied.
      Parameters:
      restrictions - search restrictions
      Returns:
      AND boolean search restriction
    • optionalAllOf

      public static SearchRestriction optionalAllOf(SearchRestriction... optionalRestrictions)
      Returns a combined restriction where all of the non-empty search restrictions have to be satisfied.
      Parameters:
      optionalRestrictions - restrictions, NullRestriction.INSTANCE are considered empty and skipped
      Returns:
      combined search restriction
    • allOfIfNeeded

      public static SearchRestriction allOfIfNeeded(Collection<? extends SearchRestriction> restrictions)
    • anyOfIfNeeded

      public static SearchRestriction anyOfIfNeeded(Collection<? extends SearchRestriction> restrictions)