Package org.ametys.cms.search.query
Class TagQuery
java.lang.Object
org.ametys.cms.search.query.TagQuery
- All Implemented Interfaces:
Query
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
-
Constructor Summary
ConstructorDescriptionBuild 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
-
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.
-
-
Method Details
-
getOperator
Get the operator.- Returns:
- the operator
-
getValues
Get the values.- Returns:
- the values
-
getLogicalOperator
Get the logicalOperator.- Returns:
- the logicalOperator
-
build
Description copied from interface:Query
Build the solr query string representing the Query object.- Specified by:
build
in interfaceQuery
- Returns:
- the solr query string representing the Query object.
- Throws:
QuerySyntaxException
- if the query can't be built because of a syntax error.
-
hashCode
-
equals
-