Class Combine
java.lang.Object
com.atlassian.crowd.search.builder.Combine
Builder for MultiTermRestrictions.
For usage see
QueryBuilder
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BooleanRestriction
allOf
(SearchRestriction... restrictions) Returns anAND
boolean search restriction where all of the search restrictions have to be satisfied.static BooleanRestriction
allOf
(Collection<? extends SearchRestriction> restrictions) Returns anAND
boolean search restriction where all of the search restrictions have to be satisfied.static SearchRestriction
allOfIfNeeded
(Collection<? extends SearchRestriction> restrictions) static BooleanRestriction
anyOf
(SearchRestriction... restrictions) Returns anOR
boolean search restriction where only one or more of the search restrictions have to be satisfied.static BooleanRestriction
anyOf
(Collection<? extends SearchRestriction> restrictions) Returns anOR
boolean search restriction where only one or more of the search restrictions have to be satisfied.static SearchRestriction
anyOfIfNeeded
(Collection<? extends SearchRestriction> restrictions) static SearchRestriction
optionalAllOf
(SearchRestriction... optionalRestrictions) Returns a combined restriction where all of the non-empty search restrictions have to be satisfied.
-
Constructor Details
-
Combine
public Combine()
-
-
Method Details
-
anyOf
Returns anOR
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
Returns anAND
boolean search restriction where all of the search restrictions have to be satisfied.- Parameters:
restrictions
- search restrictions- Returns:
AND
boolean search restriction
-
anyOf
Returns anOR
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
Returns anAND
boolean search restriction where all of the search restrictions have to be satisfied.- Parameters:
restrictions
- search restrictions- Returns:
AND
boolean search restriction
-
optionalAllOf
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
-
anyOfIfNeeded
-