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
_query
The negated query.static String
NEGATION_QUERY_PREFIX
The prefix for making a query negative.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringBuilder
appendNegation(StringBuilder query)
Appends a negation to the query being built.String
build()
Build the solr query string representing the Query object.boolean
equals(Object obj)
Query
getQuery()
Get the negated query.int
hashCode()
String
toString(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: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
public String toString(int indent)
Description copied from interface:Query
Gets a representation of thisQuery
, for pretty-printing for logging and debugging purposes
-
-