visibility
public static <T extends EntitlementsSearchBean> org.elasticsearch.index.query.BoolQueryBuilder visibility(org.elasticsearch.index.query.BoolQueryBuilder boolQueryBuilder,
@NotNull
T searchBean,
@NotNull
@NotNull CriteriaQueryProcessor PROCESSOR)
Method is used to apply EntitlementsSearchBean#getShowOnlyVisible()
rule for elastic search data.
Visibility rule must be always processed, so use must operator additionally to entire search query.
if boolQueryBuilder is empty or null, than only visibility rule must be applied
- Parameters:
boolQueryBuilder
- - search query based on another search parameters, could be null BoolQueryBuilder
searchBean
- - search bean that is inherit EntitlementsSearchBean
class
PROCESSOR
- - CriteriaQueryProcessor
- helper to translate criteria to query
- Returns:
BoolQueryBuilder
that is come from arguments; will return new instance if boolQueryBuilder was null