Package org.ametys.cms.search.query
Class NotQuery
- java.lang.Object
-
- org.ametys.cms.search.query.NotQuery
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.cms.search.query.Query
Query.LogicalOperator, Query.Operator
-
-
Field Summary
Fields Modifier and Type Field Description protected Query_queryThe negated query.static StringNEGATION_QUERY_PREFIXThe prefix for making a query negative.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringBuilderappendNegation(StringBuilder query)Appends a negation to the query being built.Stringbuild()Build the solr query string representing the Query object.booleanequals(Object obj)QuerygetQuery()Get the negated query.inthashCode()StringtoString(int indent)Gets a representation of thisQuery, for pretty-printing for logging and debugging purposes
-
-
-
Field Detail
-
NEGATION_QUERY_PREFIX
public static final String NEGATION_QUERY_PREFIX
The prefix for making a query negative.- See Also:
- Constant Field Values
-
-
Method Detail
-
appendNegation
public static StringBuilder appendNegation(StringBuilder query)
Appends a negation to the query being built.
This method just doessb.append("*:* -");- Parameters:
query- The query builder- Returns:
- The given query builder
-
build
public String build() throws QuerySyntaxException
Description copied from interface:QueryBuild the solr query string representing the Query object.- Specified by:
buildin 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
public String toString(int indent)
Description copied from interface:QueryGets a representation of thisQuery, for pretty-printing for logging and debugging purposes
-
-