Package org.ametys.cms.search.query
Class TagQuery
Represents a
Query
testing if an object possesses one or more tags.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.cms.search.query.Query
Query.LogicalOperator, Query.Operator
-
Field Summary
Fields inherited from interface org.ametys.cms.search.query.Query
BOOL_FILTER, BOOL_MUST, BOOL_MUST_NOT, BOOL_SHOULD
-
Constructor Summary
ConstructorsConstructorDescriptionBuild a TagQuery.Build a TagQuery.TagQuery
(Query.Operator operator, boolean descendantAutoposting, String value) Build a TagQuery.TagQuery
(Query.Operator operator, boolean descendantAutoposting, String... values) Build a TagQuery.TagQuery
(Query.Operator operator, boolean descendantAutoposting, Query.LogicalOperator logicalOperator, String... values) Build a TagQuery.TagQuery
(Query.Operator operator, String value) Build a TagQuery.TagQuery
(Query.Operator operator, String... values) Build a TagQuery. -
Method Summary
Methods inherited from class org.ametys.cms.search.query.AbstractMultivaluedQuery
build, buildAsJson, equals, hashCode, singleValueForQuery
Methods inherited from class org.ametys.cms.search.query.AbstractOperatorQuery
getFieldName, getOperator, getValue, rewrite, valueForQuery
-
Constructor Details
-
TagQuery
Build a TagQuery.- Parameters:
value
- the tag id to test.
-
TagQuery
Build a TagQuery.- Parameters:
values
- the tag IDs to test.
-
TagQuery
Build a TagQuery.- Parameters:
operator
- the operator.value
- the tag id to test.
-
TagQuery
Build a TagQuery.- Parameters:
operator
- the operator.values
- the tag IDs to test.
-
TagQuery
Build a TagQuery.- Parameters:
operator
- the operator.descendantAutoposting
- true to enable descendant autoposting (parent tags are found), false otherwise.value
- the tag id to test.
-
TagQuery
Build a TagQuery.- Parameters:
operator
- the operator.descendantAutoposting
- true to enable descendant autoposting (parent tags are found), false otherwise.values
- the tag IDs to test.
-
TagQuery
public TagQuery(Query.Operator operator, boolean descendantAutoposting, Query.LogicalOperator logicalOperator, String... values) Build a TagQuery.- Parameters:
operator
- the operator. The operator is applied to each value individually. For instance, if operator isNE
and logicalOperator isOR
, then the Query represents:(NOT A) OR (NOT B) ...
descendantAutoposting
- true to enable descendant autoposting (parent tags are found), false otherwise.logicalOperator
- the logical operator.values
- the tag IDs to test.
-