Package org.ametys.cms.search.query
Class NotQuery
java.lang.Object
org.ametys.cms.search.query.NotQuery
- All Implemented Interfaces:
Query
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.cms.search.query.Query
Query.LogicalOperator, Query.Operator
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringBuilder
appendNegation
(StringBuilder query) Appends a negation to the query being built.build()
Build the solr query string representing the Query object.boolean
getQuery()
Get the negated query.int
hashCode()
toString
(int indent) Gets a representation of thisQuery
, for pretty-printing for logging and debugging purposes
-
Field Details
-
NEGATION_QUERY_PREFIX
The prefix for making a query negative.- See Also:
-
_query
The negated query.
-
-
Constructor Details
-
NotQuery
Build a NotQuery object.- Parameters:
query
- the negated query.
-
-
Method Details
-
getQuery
Get the negated query.- Returns:
- the negated query.
-
appendNegation
Appends a negation to the query being built.
This method just doessb.append("*:* -");
- Parameters:
query
- The query builder- Returns:
- The given query builder
-
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.
-
toString
Description copied from interface:Query
Gets a representation of thisQuery
, for pretty-printing for logging and debugging purposes -
hashCode
-
equals
-