Package org.ametys.cms.search.query
Class QueryHelper
java.lang.Object
org.ametys.cms.search.query.QueryHelper
Class providing helper methods to Query implementations.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The special value testing that the field exists. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Escape the query except stars and whitespaces.static final String
getStandardQuery
(String fieldName, Query.Operator operator, Object value) Get a standard query on a value, with all possible standard operators.
-
Field Details
-
EXISTS_VALUE
The special value testing that the field exists.- See Also:
-
-
Method Details
-
getStandardQuery
public static final String getStandardQuery(String fieldName, Query.Operator operator, Object value) Get a standard query on a value, with all possible standard operators.- Parameters:
fieldName
- The field name.operator
- The operator.value
- The value, can be null if the operator is EXISTS.- Returns:
- The standard value query.
-
escapeQueryCharsExceptStarsAndWhitespaces
Escape the query except stars and whitespaces. (Identical to ClientUtils#escapeQueryChars except for stars or whitespaces)- Parameters:
query
- the string query to escape- Returns:
- the escaped query
-